On Saturday 19 March 2011 06:02:49 bearophile wrote: > tsukikage: > > Would please someone explain why enum A etc. is constructed at run time? > > enum is currently very broken. The same happens with associative arrays, > etc.
Well, enum works perfectly in that its value doesn't change. It's always the same value. The problem is that the way that it's currently implemented is highly inefficient - though the fact that it recreates the value every time would make it so that is failed where you'd expect it to succeed - though arguably that's also an implementation detail. Regardless, enum works fine in the general case, but it's current implementation is inefficient. I expect that it will be fixed at some point, but as with many things, who knows where it is on the TODO list. There's always something more important/critical that needs to be done. - Jonathan M Davis
