On Saturday, 31 January 2015 at 05:07:35 UTC, Kapps wrote:
On Friday, 30 January 2015 at 19:07:53 UTC, Andrei Alexandrescu
wrote:
The interesting thing is because of the tight overloading
rules, "s" will only match statically-sized arrays. So it's
okay to simply expose it as std.array.s without fear it might
clash with other uses of the "s" symbol. Awesome. -- Andrei
Example:
auto foo = Variant([1, 2, 3].s)
rather than
auto foo = Variant(cast(int[$])[1, 2, 3])
The one really bad thing about this is that it forces you to
declare it as auto.
While having the possibility to write auto is nice, forcing you
to do so is quite ugly.
I still to this day hate the Scoped, exactly for the same reason.
I just want examples *without* being forced to use auto.
Auto is less clearer about one ecpects an expresion to be.