You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assignment of arrays in PLanG is by value, that is, they are recursively cloned during assignments. Passing an array as an argument to a function or procedure would follow the same behaviour.
The problem is, this makes procedures kinda useless. Traditionally, in Pascal, procedures are used to alter passed arrays, and that'd be a good usecase for Plang too. But that's impossible with these pass-by-value semantics, unless we introduce out parameters. Without it, the only possible usecase for procedures is to output things. Which is underwhelming.
The text was updated successfully, but these errors were encountered:
Assignment of arrays in PLanG is by value, that is, they are recursively cloned during assignments. Passing an array as an argument to a function or procedure would follow the same behaviour.
The problem is, this makes procedures kinda useless. Traditionally, in Pascal, procedures are used to alter passed arrays, and that'd be a good usecase for Plang too. But that's impossible with these pass-by-value semantics, unless we introduce out parameters. Without it, the only possible usecase for procedures is to output things. Which is underwhelming.
The text was updated successfully, but these errors were encountered: