Yet another leak in the sinking ship of @safe
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 18 11:55:33 PST 2016
On Thursday, 18 February 2016 at 18:58:24 UTC, Steven
Schveighoffer wrote:
> And implicit casts to void[] should be disallowed.
We could strike a sane medium: in a @safe function or when
calling a @safe function, implicit conversions of any array WITH
REFERENCES is not allowed, while other arrays may be
reinterpreted.
So you can still pass ubyte[], char[], long[], etc. to a @safe
void[] thing, but not Object[] or ubyte*[] or struct Foo {int *a
}[].
This should cover the vast majority of the sane use-cases for
Socket.receive, etc., anyway without being a problem.
More information about the Digitalmars-d
mailing list