andre at s-e-a-p.de
Wed Nov 18 10:39:10 UTC 2020
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
> As promised , I have started setting up a DIP to improve
> tuple ergonomics in D:
> This DIP aims to make code like the following valid D:
> auto (a, b) = (1, 2);
> (int a, int b) = (1, 2);
> foreach((sum, diff); [(1, 2), (4, 3)].map!((a, b) => (a + b, a
> - b)))
> writeln(sum, " ", diff);
> /+ prints:
> 3 -1
> 7 1
> Before going ahead with it, I'd like some preliminary community
> - I'm not yet completely satisfied with the DIP.
> (See section "Limitations".)
> Please let me know suggestions or further concerns you might
> - There are good example use cases missing. While I'm confident
> I could
> invent a few of them given a little time, I thought maybe I
> expedite the process and make the point more convincingly by
> for use cases you encountered in your own code. The DIP
> contains an example due to bearophile.
>  https://email@example.com
Any chance you can work further on this DIP?
I currently port a python library to D and would like to keep the
as similar to Python as possible (Decreases maintenance effort in
for including changes made in the original coding).
The features proposed in your DIP actually are a big win here.
More information about the Digitalmars-d