Has the ban on returning function nested structs been lifted?

spir denis.spir at gmail.com
Sat Mar 19 07:24:48 PDT 2011


On 03/19/2011 01:40 PM, Simen kjaeraas wrote:
> On Sat, 19 Mar 2011 13:05:59 +0100, spir <denis.spir at gmail.com> wrote:
>
>> I guess something similar should be the base design of ranges. "Range of X"
>> could simply mean "lazy sequence of X", an on-demand array (lol); and that
>> would be the return type of every function returning a range. The complexity
>> (of filter-ing, map-ping, find-ind) could be hidden inside the object, not
>> exposed in the outer type.
>
> Such a scheme precludes the usage of structs as ranges, though. It would
> require virtual functions.

Oh, yes, seems you're right. Too bad.

Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d mailing list