Is enum static?

Dicebot public at dicebot.lv
Tue Aug 20 17:13:02 PDT 2013


On Tuesday, 20 August 2013 at 23:42:48 UTC, Jonathan M Davis 
wrote:
> And IMHO, the fact that the language _ever_ implicitly slices 
> static arrays is
> a major design flaw.

Here you have my agreement, I tend to dislike any implicit 
slicing as well as any other implicit operation that is not 100% 
obvious.

> Slicing a static array is the equivalent of taking the address 
> of a local
> variable. It's a bug that it's not considered @system.

Sure. But array literals won't get static in @system code. That 
is exactly what I am speaking about - pursuing correctness of 
@safe severely harms @system. It never was advertised that way. 
Was it meant to?


More information about the Digitalmars-d-learn mailing list