Helping with __mutable (which will be renamed to __metadata)

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Apr 16 20:40:58 UTC 2019


On 4/12/19 8:45 PM, Andrei Alexandrescu wrote:
> Razvan Nitu is working on the DIP initiated by Timon Gehr, known 
> colloquially as the one that introduces __mutable - i.e. a mechanism for 
> allowing controlled changes to immutable data. Here's a draft:
> 
> https://github.com/RazvanN7/DIPs/blob/Mutable_Dip/DIPs/DIP1xxx-rn.md
> 
> We figured that we're dealing a misnomer - we don't want __mutable, but 
> instead __metadata - information that is nominally part of the object 
> but needs certain leeway from the type system. Typical use cases are:
> 
> * reference counting of immutable data structures
> * caching
> * lazy evaluation
> 
> We got stuck at the interaction of __mutable with const parent objects 
> (unclear whether the parent object originated as immutable or 
> unqualified), and how pure functions should deal with __mutable. The few 
> solutions we are toying with are either incomplete or too complicated 
> (or both).
> 
> The help of a few PL and compiler specialists would be very valuable 
> here. I'm cc'ing a few, if anyone wants to help please let us know.

There seems to be a good amount of interest in the forum. Thanks! To 
better move things forward, we'd need to have a more fleshed-out 
proposal to show the community for discussion. Until then, let's move to 
a special interest group.

Those interested who can commit one hour a week to a meeting, please 
email me. We'll exchange information via email (mailing list if 
necessary) and meet every week to discuss progress.


More information about the Digitalmars-d mailing list