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.

Reply via email to