Open flaxed opened 5 years ago
We could annotate the type i.e. [[reference]]
.
On a second thought, references are specific to some programming languages. Maybe we should be more specific in what we want and let the code generator implement it appropriately for the target language?
I.e. if the purpose of having a reference field is to be able to make it null, maybe a [[nullable]]
annotation is both more clear and language agnostic.
The need for a first-class representation of pointers and\or references is evident from discussions on slack.
However a carbon copy from C should be avoided, since it does not map well to other languages, like C# where how its stored or referenced depends on the type not the field.
Might be better to keep it as a single keyword meaning an object stored somewhere else.