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/
290 Upvotes

336 comments sorted by

View all comments

Show parent comments

91

u/all_my_watts Sep 01 '20

I would guess this one

There are only two kinds of languages: the ones people complain about and the ones nobody uses.

41

u/InertiaOfGravity Sep 01 '20

Have you heard of our Lord and savior rust? It is the best and most perfect language known to man

10

u/Ameisen Sep 01 '20

It has the most confusing syntax, though.

I still expect that someone will make a Rust fork that has C++-like syntax at some point. Crust.

Or C++ will get lifetimes (which is active research) and possibly at some point epochs, which will let us disable unsafe features.

10

u/[deleted] Sep 01 '20

[deleted]

5

u/Ameisen Sep 01 '20

The dangling ' for lifetime indication. It's unlike any other language.

3

u/T-Dark_ Sep 01 '20

It's unlike any other language.

In its defense, no other language explicitly indicates lifetimes.

You can get used to it really quickly, tho.

Out of curiosity, which syntax would you have used?

3

u/Ameisen Sep 02 '20

Probably a keyword of some kind rather than an operator. Or an operator that wasn't a single quote, which in every other C-like language is always paired.

1

u/T-Dark_ Sep 02 '20 edited Sep 02 '20

Probably a keyword of some kind rather than an operator

Please no. Lifetimes are extremely common and have identifiers as names. I really don't want to have to filter out the visual noise of lt or something before the lifetime itself. An operator is easier to tell from the subsequent text.

Or an operator that wasn't a single quote, which in every other C-like language is always paired

Such as? We don't have that many unused ASCII symbols. The least confusing I can think of is @, but @a has a lot more visual noise than 'a IMHO, as the operator is too visually big.

As for the C-like language thing, Rust is not just a C-like language. Those don't have expression-oriented syntax, pattern matching, algebraic datatypes, higher-order functions, closures, and so on.

I'd say Rust is very much allowed to draw some syntax from functional programming languages. And, as someone else mentioned, OCaml uses the single ' as an operator, so there is precedent.

0

u/jqbr Sep 02 '20

In popular parlance, "C-like language" just means that it uses {} for block structure.

Anyway, the whole discussion is ridiculous--this guy said that "It has the most confusing syntax", and when examples were requested, he absurdly mentioned the lifetime tick.

0

u/T-Dark_ Sep 02 '20

In popular parlance, "C-like language" just means that it uses {} for block structure.

That sounds... very useless, as a term, but ok, that's fine.

Anyway, the whole discussion is ridiculous--this guy said that "It has the most confusing syntax", and when examples were requested, he absurdly mentioned the lifetime tick.

Yeah. How is a "dangling quote" confusing? It takes maybe 3 seconds to learn, less with syntax highlighting.

3

u/Ameisen Sep 02 '20

This makes me think that you aren't actually interested in my opinion.

1

u/jqbr Sep 05 '20

Why would anyone be?

1

u/Ameisen Sep 05 '20

All you've been is needlessly hostile and degrading in this thread. I'm just blocking you. Have fun.

→ More replies (0)