std.experimental.collection.functional.slist

Ivan Timokhin via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 19 07:19:40 PDT 2015


On Fri, Jun 19, 2015 at 01:49:14PM +0000, Jonathan M Davis wrote:
> On Friday, 19 June 2015 at 13:36:22 UTC, Andrei Alexandrescu 
> wrote:
> >> 3. Shouldn't `front` functions be const?
> >
> > Good point. Made const.
> 
> That's not necessarily a good idea. What if the element type 
> can't even be used when it's const? inout might work in that 
> case, but in general, you have to be _very_ careful with slapping 
> const on generic code.
> 
> - Jonathan M Davis

The return type was const from the beginning; see also
http://forum.dlang.org/post/mlvuh3$2du2$1@digitalmars.com


More information about the Digitalmars-d mailing list