On Friday, 29 March 2013 at 21:36:37 UTC, Steven Schveighoffer wrote:
(and yes, casts are dangerous and should be avoided).

I think you are applying "common knowledge" to something where it doesn't apply.

auto foo = cast(TickDuration) bar;

This is not unsafe, unless you claim that opCast is being implemented in a dangerous manner (takes a Variant and converts it to 32)

I'm really confused on what your argument is. It sounds like you don't want to!() to be able and convert user types, but if it does than it shouldn't be allowed to use cast.

I'm not sure what issue you are expecting to prevent by requiring bar.toTickDuration() instead of using cast or to!().

Reply via email to