how to do iota(0,256) with ubytes ? (cf need for iotaInclusive)

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 12 03:08:04 PDT 2015


On Monday, 12 October 2015 at 09:24:12 UTC, Marc Schütz wrote:
> On Sunday, 11 October 2015 at 21:31:27 UTC, Jonathan M Davis 
> wrote:
>> Their use is discouraged at this point, but they're used by so 
>> much code that I'd be very surprised if they were ever 
>> deprecated. And until we have a solution for being able to 
>> compare non-string lambdas for equality, they're _defintely_ 
>> not going to be deprecated. Regardless, AFAIK, neither Walter 
>> nor Andrei has ever stated that they will be removed from 
>> Phobos - just that we want to move towards using the newer 
>> style lambdas instead.
>
> Besides, `reduce!"a+b"` and `map!"a*a"` are more concise than 
> the lambda versions and can therefore be preferable in some 
> situations.

Yeah. I like them, but if it weren't for the fact that regular 
lambdas can't be compared, it would probably be being pushed as 
bad practice to use string lambdas. They were already removed 
from all of the std.algorithm docs because of that. They 
generally seem to be considered a failure that has been replaced 
by the shorter lambda syntax that we copied from C#.

- Jonathan M Davis


More information about the Digitalmars-d mailing list