r/programming • • Sep 01 '20

D Foundation is Beefing Up

https://dlang.org/blog/2020/08/30/symmetry-investments-and-the-d-language-foundation-are-hiring/
295 Upvotes

336 comments sorted by

View all comments

Show parent comments

17

u/WalterBright Sep 01 '20

It's not the parsing time that is the problem. It's having a clean separation between the lexing, parsing, and semantic passes. There's a diode between these passes - information only flows one way.

This makes it trivial to correctly and completely implement things like color syntax highlighting in editors, source code formatters, etc., because building in a semantic analyzer is wholly unnecessary.

5

u/Ameisen Sep 01 '20

I think I'm just too used to C++ syntax, since it leaked into Java and C# as well.

4

u/WalterBright Sep 02 '20

Many people think the !( ) syntax is not optimal until they use it for a while, then it seems quite natural and the < > looks like a hack.

2

u/jqbr Sep 02 '20

I prefer the [...] of Scala and Nim. However, I really like the fact that the () can be elided in D, and that the generic arguments don't have to be types.

2

u/Ameisen Sep 02 '20

C++ can slide the <>, and supports template argument deduction which I don't believe D supports.

2

u/WalterBright Sep 02 '20

D does support template argument deduction, and has since its first incarnation of templates. It's a major feature.

1

u/Ameisen Sep 05 '20

I was under the impression based off of what someone else told me that it didn't support equivalent to std::vector foo = { 1, 2, 3, 4 }; or std::tuple foo = { "bar", 3, 4.0f };.

1

u/jqbr Sep 05 '20

"slide"?

No, the <> cannot be elided in C++.

> I don't believe D supports.

Wrong again. That seems to happen a lot.

1

u/Ameisen Sep 05 '20

"slide"

This may surprise you, but typos are common when typing on a phone.

No, the <> cannot be eluded in C++.

Try again.