Mutable Barrel mode recipe
TheDrawingCoder-Gamer opened this issue ยท 3 comments
Recipe's barrel modes are mutable, which is not what recipes should be. Probably should make an immutable version to prevent silly issues stemming from fetching an invalid output.
I don't really know of a good way to architect this. Would every mode have an immutable version, if so serial logic becomes way more complicated. A flag would be possible, but would probably not cover all edge cases
Simply wrapping a mutable one with controlled access and copys on wrap and unwrap would work
This is also why I prefer langs like scala - they have types built around being immutable and come with extra copy fields that make it easy to change without truly changing.