On 11/02/2018 12:51 PM, Dukc wrote:
On Wednesday, 7 February 2018 at 13:29:04 UTC, Mike Parker wrote:
Walter's got a new post up! It's the first in a new series on the
benefits of BetterC mode. In this one, he talks about solving the
fencepost problem (off-by-one errors) with D's arrays.
I think that at some point it should also be highlighted that many of
the best part of Phobos will still work with BetterC. I just, using the
excellent example of Cosinus as base, added this line to a code compiled
with Emscripten, which so far requires BetterC:
foreach(num; iota(5, 15).map!(x => x*2)) printf("%d ", num);
And it worked just as in desktop, meaning that one can do pipeline
programming in the internet using D! Or in any enviroment where D can
compile to, D runtime or no.
This is probably no news to people who already know D compilers well,
but for those less familiar with the internals it may be quite a welcome
surprise.
Out of interest will each! work here as well?