jmeaster30 / ocean

A C-like programming language (get it like sea-like like an ocean lol)
GNU General Public License v3.0
0 stars 0 forks source link

Allow functions to receive mutable references to variables outside of that function's scope #53

Open jmeaster30 opened 1 year ago

jmeaster30 commented 1 year ago

The reference concept is meant to resemble heap allocated memory so inside a function the user should be able to load and modify the values of those references.

But you can build a reference inside a function to access variables outside the function. This is only allowed if the reference is passed as a function argument.

jmeaster30 commented 10 months ago

holding off until I find a use case for it

jmeaster30 commented 10 months ago

87 may make this obsolete