Worst ideas/features in programming languages?

victoroak jackpboy at gmail.com
Fri Nov 5 21:54:27 UTC 2021


On Friday, 5 November 2021 at 21:46:35 UTC, H. S. Teoh wrote:
>
> @safe does not mean enforcing type constraints.  It means 
> *memory* safety.  The above code exhibits no memory unsafety, 
> even though constraints are violated and the output is, 
> ostensibly, wrong because of broken constraints.
>
>

`.init` was not mentioned as breaking `@safe` just as a bad 
feature and I was answering why I think it is a bad feature.

But the presence of both `.init` and @safe `void` initialization 
makes it way harder to write correct `@trusted` code that depends 
on some constraints because you can't really enforce them.




More information about the Digitalmars-d mailing list