Just where has this language gone wrong?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Jul 21 15:24:04 PDT 2012


On 7/21/12 6:16 PM, Nick Sabalausky wrote:
> Yea. I used Java in college and ever since then I've been a fan of
> non-verbose systax - ie syntax that's the *opposite* of Java ;)

On slide 19 of the OSCON slides there's this sample:

auto s = ["abc", "a", "xz"];
auto m = s.argmin!((x) => x.length);

People in the audience were quite pleasantly surprised to figure that 
although there's no mention of a type, that code is all the compiler 
needs to figure there's a lambda that takes a string and returns an 
unsigned integer etc.


Andrei



More information about the Digitalmars-d mailing list