enum of tuples

Jonathan M Davis jmdavisProg at gmx.com
Thu Sep 27 19:02:13 PDT 2012


On Friday, September 28, 2012 03:56:39 Simen Kjaeraas wrote:
> On 2012-09-27, 00:02, Jonathan M Davis wrote:
> > Classes will not work for the same reason that you can never use a class
> > object as an enum with manifest constants.
> 
> Has a decision been made as to whether or not this will be possible in the
> future?

No such promise has been made. It's a huge implementation problem to do it. It 
_may_ be done at some point, but the difficulties involve make it so that it's 
not at all certain that it will ever happen. Anything involving saving 
pointers from compile time to reuse at runtime is incredibly problematic (if 
nothing else, because none of the addresses that they have at compile time 
will be valid at runtime). Dynamic arrays are the only case where anything 
like that occurs, and it may very well be that that's the way that it'll 
always be. We'll just have to wait and see. Certainly, it won't happen any 
time soon.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list