Comment #0 by john.loughran.colvin — 2016-03-03T15:51:03Z
The motivation is stuff like this:
zip(iota(10), iota(10, 20))
.map!(t => Tuple!(int, "a", int, "b)(t))
.map!(t => with(t) a + b);
which, short of having some proper tuple unpacking syntax (that would be so, so good), is nicer than the current
.map!((t) { with(t) return a + b; });
that might seem like a small change, but I'm having a hard time selling D and functional programming to scientists with all the heavyweight syntax, they are spoiled by the inefficient but neat-looking numpy model.
Comment #1 by dlang-bot — 2022-03-07T07:21:37Z
@maxhaton created dlang/dmd pull request #13776 "Fix Issue 15749 - Implement with expressions" fixing this issue:
- Fix Issue 15749 - Implement with expressions
https://github.com/dlang/dmd/pull/13776
Comment #2 by robert.schadek — 2024-12-13T18:47:04Z