On 2011-06-05 09:43, Andrej Mitrovic wrote: > Ah the good old typeof. It's nice to have language sugar like this > that save the day. :)
I really don't think that Andrei was thinking that people would need to save ranges when he started internalizing all of the range types in std.range and std.algorithm. So, it _is_ a bit annoying for this particular use case. But for everything else, it's a definite improvement. There are fewer names in the namespace and it completely hides the type, highlighting that no one should care about what the return type really is (which is one of the things that seems to definitely scare newbie to std.algorithm - thank goodness for auto). So, as long as it's possible to still save ranges with typeof and whatnot, I'd expect that Andrei is going to want to make it so that _all_ functions which have their own range type just for returning have that type be internal to the function and effectively nameless. - Jonathan M Davis
