Filter and Map's weird return types cause frustration...
John Colvin
john.loughran.colvin at gmail.com
Sat Feb 23 17:33:04 PST 2013
On Saturday, 23 February 2013 at 22:26:51 UTC, notna wrote:
> Thanks for this very good explanations and examples. This
> "Range" topic is a constant confusion, see one of many examples:
>
> http://forum.dlang.org/thread/rynfksadckwinwaurtiy@forum.dlang.org
>
> I don't understand why D cannot be simple AND efficient.
> I think every function, which returns a kind of a "Range",
> should also always be able to return "char", "char[]",
> "char[][]", "string" and "string[]" per default, depending on
> what is expected.
Being lazy is often critical for performance. Returning a normal
type automatically implies eagerness.
More information about the Digitalmars-d
mailing list