On 04/28/2010 02:10 AM, bearophile wrote:
With a smart compiler+linker there is no need to tell apart the two cases:enum int x = 10; immutable int y = 20; If the linker is smart it can replace the references to y with 20 and then remove all the y name from the binary, just like for the x case. With LTO the LDC compiler is able to do this (but it's a D1 compiler, so there is only const, that equals to D2 enum).
auto p = &y; Can't do that with an enum!
