brain
brain copied to clipboard
All Variables Are Mutable References
This is an intentional/planned bug.
In order to make the MVP implementation simpler, all variables are essentially mutable references when passed into functions. This isn't explicit at all and is instead some compiler magic that accomplishes everything behind the scenes. This is okay enough in the short term since the only functions are a few compiler functions, but references (#48) need to be properly implemented as soon as possible.
No mutation is currently protected.
Eventually, we want primitives to have copy semantics and structs to have move semantics (unless they implement Copy).