On Sunday, 16 February 2014 at 13:22:09 UTC, bearophile wrote:
In the last days of beta3 D+Phobos is getting better in small but significant ways:

immutable s = ["red", "blue"];
auto js = s.join;

This is very handy because you can join arrays from constant function arguments, or the result of a map that yields const items, etc.

-----------------------

And I am finding the optional column number in error messages very handy, my editor/IDE often jumps at the right column, saving me tiny amounts of time that adds up making the debugging nicer. The experience is just better than before.

-----------------------

auto r = [10, 20, 30].sum;

This has replaced me tens of usages of:
alias sum = reduce!q{a + b};
Or:
alias sum = curry!(reduce!q{a + b}, 0);


But I have found problems because currently sum(int[]) returns a long, see the discussion so far:
https://d.puremagic.com/issues/show_bug.cgi?id=12169

Bye,
bearophile

What is q{a + b} ?

Reply via email to