Yet another leak in the sinking ship of @safe

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 18 10:58:24 PST 2016


On 2/18/16 11:37 AM, H. S. Teoh via Digitalmars-d wrote:
> While @safe is a good idea in principle, the current implementation is
> rather lackluster.

IMO, I think safe code should disallow casting that doesn't involve a 
runtime function that verifies safety (such as casting an object to 
another type, or invoking a @safe opCast), including casting array types.

And implicit casts to void[] should be disallowed.

This would be a painful restriction, which is why I think it won't happen :(

-Steve


More information about the Digitalmars-d mailing list