Skip to content

Procedures would be kinda useless #14

@Botffy

Description

@Botffy

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions