Skip to content

Feature: Parameters should actually be read-only #65

@brendanfh

Description

@brendanfh

Currently, parameters are lightly assumed to be read-only by the code generator, and the code generator will make mistakes if parameters are modified. This mostly affects structs and unions passed by value, as they consume stack memory that is not handled correctly. I believe to fix the actual problems with memory corruption would be rather difficult and would not solve all of the problems.

Instead, I think parameters should be enforced as read-only. This is how most other languages operate. It also allows me to implement compiler optimizations in the future, like transparently passing a reference to a structure because I know it cannot be changed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions