News for hackers. Stuff that matters.
Re:Minimalism in programming language design by sshine on Tuesday May 24, 2022 @05:33AM (#31489866)
A recent observation about the advantage of syntactic minimalism:

As a newcomer to Rust, a thing I noticed is the syntactic explicitness around generics: In particular, I had to learn to write Foo::<T>::bar(), i.e. the double `::` seems verbose. But it is also unambiguous that the `<` is not a less-than, because it comes to the right of a `::`. There are other `<T>`s that don't need `::` because they're already somewhere that could only be a type. A human probably wouldn't mistake those. So you might have syntactic complexity in a syntax that is easy for a human to wrap their minds around, and perhaps even makes expressing yourself easier.

It wasn't until recently that someone on ##rust pointed out that with unambiguous syntax, you can more easily transform old code, too. So in some future where a piece of syntax changes, you can more easily write a tool that transforms old code into new code.

Re:Minimalism in programming language design by thrtythreeforty on Wednesday May 25, 2022 @02:34AM (#31501272)
The turbofish gets everyone's goat at some point but it teaches an important lesson: it is incredibly difficult to build a Rust-size grammar that is free of ambiguities! Modern parser tooling (e.g. tree-sitter) will at least yell at you when you specify an ambiguity.