Whiley / RFCs

Request for Comment (RFC) proposals for substantial changes to the Whiley language.
3 stars 2 forks source link

On Sized Types and Rereference Counting References #97

Open DavePearce opened 3 years ago

DavePearce commented 3 years ago

Some observations about array types:

Based on this model, we can extend to references as follows:

An interesting question here is how you create an instance of e.g. &int:2. Presumably, something like the following would be necessary:

&int:1 p = new 123
(&int:2 q, &int:2 r) = (p,p)

A similar question is how you would destroy such a reference.