Forward declaring the identity of an object
David Alayachew
davidalayachew at gmail.com
Fri Jul 7 13:11:32 UTC 2023
I actually just remembered this.
I decided earlier on that any keyword that is used to denote this feature
would be used where the variable is being passed in, like a "hall pass".
Node a;
Node b = new Node(__hall_pass a);
a = new Node(b);
I wanted to highlight this because your example put the keyword at the
declaration site rather than the use site.
Doing it my way is clearer because, for example in the enum example I gave
earlier, you change things to say this.
enum RPS7
{
Rock(__hall_pass Scissors),
Paper(Rock),
Scissors(Paper),
;
//etc
}
Plus, in my (very ignorant and uninformed) view of how the runtime works,
putting the keyword at the use site would more closely map to what actions
the runtime takes, as well as where it would do it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230707/313725c6/attachment.htm>
More information about the amber-dev
mailing list