const challenge

Sergey Gromov snake.scaly at gmail.com
Sun Feb 3 04:11:05 PST 2008


Janice Caron Wrote:

> On 2/1/08, Sergey Gromov <snake.scaly at gmail.com> wrote:
> > On second thoughts, why would you want a function with a unique
> > parameter ?  Nothing casts to unique(), so that the caller is always
> > required to dup() or whatever.
> 
> So that you can do
> 
>     string s;
>     string t = f( g( h( i( j( k( s ))))));

Something tells me that this use case is very rare, but the dangers are
great: every and each of those functions will include an explicit cast
to unique.  Can't prove the rariness though.

The discussion loses its point unfortunately.  The chances that the
unique() gets into the language are very slim.

SnakE



More information about the Digitalmars-d mailing list