Re:Pointer Free Programming and the Future of Nim
by dbaupp on Friday October 20, 2017 @11:44AM
(#15516638)
That's true, and does mean one has to drop down to C/C++-style pointers and manual layout when the default enums don't work. However, that's somewhat orthogonal to the semantics about what they can express, especially for function arguments where the value isn't being stored in memory. One common approach is for an enum to be teased apart to be stored, and then rematerialised at the API surface (e.g. HashMap and it semantically storing an Option<(K, V)>).
[ Parent
| on HN ]
There are no comments on this comment yet.