Video: Generic Programming Galore using D @ Strange Loop 2011

Famous none at none.net
Tue Apr 24 10:02:56 PDT 2012


On Monday, 23 April 2012 at 16:45:19 UTC, bearophile wrote:
> Do you mean the min of a single item is the item itself?

Yes.

> This is right, but this case is better (more handy) left as 
> function overload to ask for the min of a single given iterable.

Would this transparantly work for an item and a set consisting of 
one item?

Of course, expressing an integer a by min(a) is not
straighforward. I do not expect anybody writing this explicitly.
Nevertheless, it seems to be a valid case. I was wondering
whether it could be useful in generative programming in order to
avoid a special case somewhere.

Cheers,
Famous


More information about the Digitalmars-d-announce mailing list