News for hackers. Stuff that matters.
Re:Minimalism in programming language design by pornel on Tuesday May 24, 2022 @09:31AM (#31491835)
C++ shat the bed for all languages :(

Rust can't do anything without people fearing it's will inevitably end up like C++, or even just look at shallow syntactic similarities and conclude it's already just as bad. But really it's not. Rust has two+ kinds of strings on purpose because it has two kinds of ownership, not because it has a historical baggage.

Really, C++'s featuritis and exponential complexity is unique to it. Pretty much every other language has survived decades of evolution without fucking up, and gracefully grew into something better. Java and C# are doing fine. JS and PHP have cleaned up a lot of mess. Even Ada and Fortran have been evolving for decades, and are fine.

People learning Rust keep asking "but whyyyyy I have to write this syntax!?", and often they're surprised that the answer isn't "because BCPL on PDP-11…", but reasonable cases of bugs and ambiguities it avoids. Robust code at scale must avoid implicit behaviors, and good compiler suggestions depend on having redundancy in the syntax, so there's a limit to how much syntax sugar Rust can have to avoid creating gotchas.

Re:Minimalism in programming language design by duped on Tuesday May 24, 2022 @11:48AM (#31493622)
> Rust can't do anything without people fearing it's will inevitably end up like C++, or even just look at shallow syntactic similarities and conclude it's already just as bad

Frankly, that's an incredibly naive take. IME engineers that are confident to try out and work in multiple languages don't get scared off by syntax, rather the semantics. The issue with Rust in this regard to many experienced C/C++ developers is that the compiler forbids programs that are valid in C or C++ (for good reason, don't get me wrong), generic programming is highly encouraged and difficult to avoid, "unsafe" code is required yet significantly more difficult to write correctly than equivalent C and C++, and frankly, lifetimes are obnoxious.

I say this as a massive Rust fan and shill. I don't think the syntax is that bad, it's certainly a lot, but I prefer it to something like Idris or Haskell that has a similarly expressive type system with noise-less syntax (that is significantly harder to read/understand compared to Rust).

> C++'s featuritis and exponential complexity is unique to it

Java is similar here, things like Project Loom for example are important but shift the paradigm for concurrency signficantly.

To be totally honest, I dismiss almost all arguments towards languages based on syntax (I think there are some to be made, don't get me wrong). It usually comes from a very naive or inexperienced place. Syntax is important, but so is correctness and non-ambiguity.

Re:Minimalism in programming language design by dunefox on Tuesday May 24, 2022 @02:15PM (#31495614)
> IME engineers that are confident to try out and work in multiple languages don't get scared off by syntax, rather the semantics.

I have never been able to get any one of my many colleagues to have more than a superficial look at a Lisp or a ml.

Re:Minimalism in programming language design by b3morales on Tuesday May 24, 2022 @11:55AM (#31493706)
If you're interested in watching a language constrain syntax but keep cranking on the feature ratchet, follow Swift's development. I can't think of another language that I've used as full of semantic special casing and context dependency.