Jump to page: 1 211  
Page
Thread overview
C++ pattern matching is coming
Oct 23, 2022
ryuukk_
Oct 23, 2022
ryuukk_
Oct 23, 2022
Ali Çehreli
Oct 23, 2022
ryuukk_
Oct 23, 2022
Paul Backus
Oct 23, 2022
Mike Parker
Oct 23, 2022
Imperatorn
Oct 23, 2022
Timon Gehr
Oct 23, 2022
Walter Bright
Oct 23, 2022
Timon Gehr
Oct 23, 2022
Timon Gehr
Oct 24, 2022
Walter Bright
Oct 24, 2022
Walter Bright
Oct 24, 2022
Walter Bright
Oct 24, 2022
Dukc
Oct 24, 2022
Timon Gehr
Oct 24, 2022
Walter Bright
Oct 24, 2022
Timon Gehr
Oct 24, 2022
Walter Bright
Oct 24, 2022
Paul Backus
Oct 24, 2022
rikki cattermole
Oct 24, 2022
Walter Bright
Oct 24, 2022
IGotD-
Oct 24, 2022
rikki cattermole
Oct 24, 2022
Walter Bright
Oct 24, 2022
rikki cattermole
Oct 25, 2022
zjh
Oct 25, 2022
zjh
Oct 25, 2022
Araq
Oct 25, 2022
Imperatorn
Oct 24, 2022
Walter Bright
Oct 24, 2022
Paul Backus
Oct 24, 2022
Walter Bright
Oct 24, 2022
Dukc
Oct 24, 2022
Walter Bright
Oct 25, 2022
Dukc
Oct 25, 2022
Dukc
Oct 24, 2022
ryuukk_
Oct 24, 2022
Timon Gehr
Oct 24, 2022
Walter Bright
Oct 24, 2022
Timon Gehr
Oct 25, 2022
Walter Bright
Oct 25, 2022
Ali Çehreli
Oct 25, 2022
Tejas
Oct 27, 2022
jmh530
Oct 25, 2022
German Diago
Oct 25, 2022
zjh
Oct 25, 2022
zjh
Oct 25, 2022
zjh
Oct 25, 2022
Alexandru Ermicioi
Oct 25, 2022
German Diago
Oct 25, 2022
Alexandru Ermicioi
Oct 26, 2022
zjh
Oct 26, 2022
Ali Çehreli
Oct 26, 2022
zjh
Oct 26, 2022
Arun
Oct 26, 2022
German Diago
Oct 26, 2022
Imperatorn
Oct 26, 2022
German Diago
Oct 26, 2022
German Diago
Oct 26, 2022
Imperatorn
Oct 26, 2022
Tejas
Oct 26, 2022
Tejas
Oct 26, 2022
German Diago
Oct 26, 2022
zjh
Oct 26, 2022
German Diago
Oct 26, 2022
Imperatorn
Oct 24, 2022
Imperatorn
Oct 23, 2022
Per Nordlöw
Oct 24, 2022
Walter Bright
Oct 23, 2022
Mike Parker
Oct 23, 2022
IGotD-
Oct 23, 2022
Paulo Pinto
Oct 23, 2022
Walter Bright
Oct 23, 2022
IGotD-
Oct 23, 2022
Timon Gehr
Oct 23, 2022
Walter Bright
Oct 24, 2022
Quirin Schroll
Oct 24, 2022
bachmeier
Oct 24, 2022
ryuukk_
Oct 27, 2022
ryuukk_
Oct 27, 2022
German Diago
Oct 27, 2022
Timon Gehr
Oct 28, 2022
Sergey
Oct 28, 2022
ryuukk_
Oct 28, 2022
ryuukk_
Oct 28, 2022
Nick Treleaven
Oct 28, 2022
ryuukk_
Oct 28, 2022
Nick Treleaven
Oct 28, 2022
ryuukk_
Oct 28, 2022
Nick Treleaven
Oct 28, 2022
ryuukk_
Oct 28, 2022
German Diago
Oct 28, 2022
Paulo Pinto
Oct 28, 2022
German Diago
Oct 28, 2022
Paul Backus
Oct 28, 2022
ryuukk_
Oct 28, 2022
Dukc
Oct 28, 2022
ryuukk_
Oct 28, 2022
IGotD-
Oct 28, 2022
ryuukk_
Oct 28, 2022
Tejas
Oct 28, 2022
Imperatorn
October 23, 2022

https://twitter.com/seanbax/status/1583654796791140352/photo/1

It looks like C++ is catching up pretty fast with other modern languages (pattern matching, builtin sumtype, modules)

Pattern matching is mentioned in the D vision document (other section) [1], but is missing in the project board [2]

Is it still planned or it was mentioned as "what's possible next"?

One issue with C++'s take is they will reserve 2 more keywords (choice, match), i think it is a huge mistake, enum and switch should have been reused imo

[1] - https://github.com/dlang/vision-document#other
[2] - https://github.com/orgs/dlang/projects?query=is%3Aopen

October 23, 2022

Forgot to add but it looks like they'll also add the .Enum support! We got a DIP for that one! https://github.com/dlang/DIPs/pull/230

October 22, 2022
On 10/22/22 17:12, ryuukk_ wrote:
> https://twitter.com/seanbax/status/1583654796791140352/photo/1

Is that really C++? I ask because there is no mention of C++ there.

Sean Baxter has been adding amazing features (very similar to D in many cases) to his Circle compiler. Not all influential C++ people agree with Circle's approach. I do agree with Circle's approach but I am not influential. :o)

Ali

October 23, 2022

On Sunday, 23 October 2022 at 00:12:32 UTC, ryuukk_ wrote:

>

Pattern matching is mentioned in the D vision document (other section) 1, but is missing in the project board [2]

Is it still planned or it was mentioned as "what's possible next"?

My prediction: if Walter gets bored of ImportC and decides to make pattern matching his next project, we'll get it. If he doesn't, we won't.

I am less optimistic about built-in sum types. The DMD frontend is not really designed to accomodate adding an entire new category of types to D's type system. I would not be surprised if someone tries to add them, but it will probably take multiple years for them to go from "initial implementation" to "usable in production code".

(Case in point: noreturn is basically the simplest possible extension to the type system you could make. Over 1.5 years since its initial implementation, it is still riddled with bugs and unusable in practice.)

October 23, 2022
On Sunday, 23 October 2022 at 01:01:20 UTC, Ali Çehreli wrote:
> On 10/22/22 17:12, ryuukk_ wrote:
> > https://twitter.com/seanbax/status/1583654796791140352/photo/1
>
> Is that really C++? I ask because there is no mention of C++ there.
>
> Sean Baxter has been adding amazing features (very similar to D in many cases) to his Circle compiler. Not all influential C++ people agree with Circle's approach. I do agree with Circle's approach but I am not influential. :o)
>
> Ali

Thanks for pointing that out, i didn't know, i thought it was related to the pattern matching proposal: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1371r1.pdf
October 23, 2022

On Sunday, 23 October 2022 at 00:12:32 UTC, ryuukk_ wrote:

>

Is it still planned or it was mentioned as "what's possible next"?

It is not and has never been "planned". It's something Walter would like in the future, but he has other priorities at the moment. That makes it a good candidate for a DIP.

October 23, 2022

On Sunday, 23 October 2022 at 01:02:16 UTC, Paul Backus wrote:

>

My prediction: if Walter gets bored of ImportC and decides to make pattern matching his next project, we'll get it. If he doesn't, we won't.

Walter's primary focus right now is shoring up DIP 1000.

October 23, 2022

On Sunday, 23 October 2022 at 02:42:53 UTC, Mike Parker wrote:

>

On Sunday, 23 October 2022 at 01:02:16 UTC, Paul Backus wrote:

>

My prediction: if Walter gets bored of ImportC and decides to make pattern matching his next project, we'll get it. If he doesn't, we won't.

Walter's primary focus right now is shoring up DIP 1000.

That's good to know. Would be great news if Dip1000 would be finalized ☀️

October 23, 2022

On Sunday, 23 October 2022 at 00:12:32 UTC, ryuukk_ wrote:

>

One issue with C++'s take is they will reserve 2 more keywords (choice, match), i think it is a huge mistake, enum and switch should have been reused imo

Can they reuse switch? In Swift they have pattern matching but they use the switch keyword for their jack-of-all-trades switch statement. Problem with C++ (and D) is that the switch statement is fallthrough by default. In order to fix this historical mistake they need a complete new keyword.

This is something to fix in D3, remove fallthrogh by default.

October 23, 2022

On Sunday, 23 October 2022 at 10:43:40 UTC, IGotD- wrote:

>

On Sunday, 23 October 2022 at 00:12:32 UTC, ryuukk_ wrote:

>

One issue with C++'s take is they will reserve 2 more keywords (choice, match), i think it is a huge mistake, enum and switch should have been reused imo

Can they reuse switch? In Swift they have pattern matching but they use the switch keyword for their jack-of-all-trades switch statement. Problem with C++ (and D) is that the switch statement is fallthrough by default. In order to fix this historical mistake they need a complete new keyword.

This is something to fix in D3, remove fallthrogh by default.

Java and C# have reused switch, by exchanging the order from "switch (var)" into "var switch".

« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11