top | item 18623737

(no title)

Ws32ok | 7 years ago

I don't agree with "unusable" but "academic" probably has some justification.

The fact that it has a "let" keyword does make it "academic" to me. I'm fairly sure we can now have compilers that don't need such hints to be explicitly provided. Rust enjoys its let keyword so much they have a "If let" syntax.

Languages that use random punctuation without providing real benefit could also use a cleanup. Lua with ~= is a good example: Tilde in mathematics means "approximate". In C != means "not equal". So lua's designers can be accused of either never seeing C or deliberately choosing something different. Given that Lua is implemented in C they can't easily claim ignorance.

Archaic and awkward ways of expressing code shouldn't be propagated into new languages unless here is a clear benefit. Have a look at Erlang. Excellent overall but has lots of old warts from yesteryear you wouldn't want in a modern language. Eg look at its string syntax / naming rules. Now compare it to Elixir. Modern. Same VM.

Moving with the times is useful. Future languages shouldn't be adding debris everywhere just to be different.

discuss

order

steveklabnik|7 years ago

“let” us a required feature of the Rust grammar; the semantics would be significantly more complex without it, making tooling harder, etc. we didn’t add it for no reason.

Ws32ok|7 years ago

Complexity often masks a lack of search for simplicity. Or was "let" the simplest answer?