Re:Nim in 2018: A short recap
by steveklabnik on Wednesday January 09, 2019 @02:33PM
(#18867976)
It’s not useless in Rust, it significantly simplies the grammar. This is good for both humans and tooling.
var isn't useless, it indicates mutability.
Re:Nim in 2018: A short recap
by a1369209993 on Thursday January 10, 2019 @01:57PM
(#18876780)
Ah, that makes sense, thanks. (Although I think that's specific to Nim?)
[citation needed]
The way Nim, Rust, etc do it, with a useless 'var' keyword even when a type is present, is clearly needlessly verbose (ie, inferior, though I'd hesitate to say vastly), but I'd be interested to see a analysis of the merits of something like "Foo[2] foo = bar()" vs "foo Foo[2] = bar()" (or maybe that should be "foo [2]Foo = bar()"?), since it hadn't actually occurred to me to use the latter order seperate from the useless keyword.