Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow with on an expression #19104

Open
dlangBugzillaToGithub opened this issue Mar 3, 2016 · 1 comment
Open

allow with on an expression #19104

dlangBugzillaToGithub opened this issue Mar 3, 2016 · 1 comment

Comments

@dlangBugzillaToGithub
Copy link

John Colvin (@John-Colvin) reported this on 2016-03-03T15:51:03Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=15749

CC List

  • mhh

Description

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.
@dlangBugzillaToGithub
Copy link
Author

dlang-bot commented on 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant