Remix.run Logo
swiftcoder 4 days ago

> in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most

Wat? If all languages were just syntax re-skinning, we really wouldn't need more than one compiler backend...

Generally the semantic differences are much more important. Rust isn't interesting for its syntax, it's interesting for its ownership rules and borrow checker. Erlang isn't interesting because of its syntax, it's interesting for its actor model concurrency. And so on...

norir 4 days ago | parent | next [-]

I agree and disagree completely with this statement. Syntax is superficial. It is the first thing that people will notice about the language (unless you hide it from them). One quickly notices that if you don't like a language syntax, you can always write a compiler that operates at a purely syntactic level to transform your desired syntax to the actual target language.

But just because syntax is superficial doesn't mean that it isn't important. If a language has such poor syntax that I feel the need to write my own compiler to work around its syntax, I have to seriously question the skills and/or motivations of the author. If I am capable of writing a compiler at the syntactic level, why not just go all in and write my own compiler that implements _my_ desired semantics? A language that I find subjectively distasteful at the syntactic level is nearly guaranteed to be filled with semantic and architectural decisions that I also dislike. Consider Rust, I do not think that its syntax and abysmal compilation times can be decoupled. I would rather write my own borrow checker than subject myself to writing rust. And the reason is not the syntax, which I do strongly dislike, but the semantic properties of the language, such as horrible compilation times and compiler bugs (if a language has more than 100 open issues on github, I consider it broken beyond repair).

archerx 4 days ago | parent | prev [-]

You say that but I will never use Rust because of it's awful syntax, I'll stick with C/C++ and be happy and not miss out on anything. I don't know much about erlang so I have no comments on it.

whytevuhuni 4 days ago | parent | next [-]

> I will never use Rust because of it's awful syntax, I'll stick with C/C++

Oh, that's very interesting. Rust tried to match C++'s syntax as much as possible.

Which parts do you find awful? Lifetimes and trait bounds?

swiftcoder 4 days ago | parent | prev [-]

> and not miss out on anything

I mean, you do you. No one is judging. The fact remains that Rust exists primarily because there are some features that C++ cannot reasonably provide

pjmlp 4 days ago | parent | next [-]

It could eventually provide some, if Safe C++ (nee Circle) proposal had gotten a warm welcome by the WG21 committee unfortunately they rather go with the mythical profiles approach.

Not only didn't they made it into C++26, it isn't clear what could land in C++29, this ignoring the assumptions regarding capabilities that static analysers are yet to provide nowadays.

archerx 2 days ago | parent | prev [-]

Rust exist because people have skill issues. Same deal with typescript.