News for hackers. Stuff that matters.
Re:Nim binary size from 160 KB to 150 Bytes by pcwalton on Monday May 04, 2015 @11:13AM (#9486632)
> Namely, I don't agree that nil is rare enough to justify the verbosity Rust uses for it. Non-nil vars may be seen more often, but that doesn't mean nil vars aren't also often used, either.

It's not verbose. "Option" is 6 characters. ".map" is 4.

> In Nim, both nil and non-nil vars are at roughly the same reach.. while in Rust non-nil vars are significantly easier work with.

Option values are really easy to work with. Just use map or unwrap if you don't care about handling the null case. If you do care about handling it (which you should, after all!) the code using "if let" is the same as the equivalent "if foo == null".

Re:Nim binary size from 160 KB to 150 Bytes by filwit on Monday May 04, 2015 @12:31PM (#9487177)
> It's not verbose. "Option" is 6 characters. ".map" is 4.

I just want to note that verbosity isn't just about symbol length, but also about operator noise and the number of available or required commands used to achieve a goal. Just counting these characters isn't very relevant, and isn't even the best Rust can do (as someone pointed out you can use 'Some()' to get an Option var, which is only 4 chars).

That said, I agree this is rather subjective, and can't be well compared outside the context of the rest of the language.

Re:Nim binary size from 160 KB to 150 Bytes by dragonwriter on Monday May 04, 2015 @12:33PM (#9487187)
> (as someone pointed out you can use 'Some()' to get an Option var, which is only 4 chars)

Some() is 6 chars.

Re:Nim binary size from 160 KB to 150 Bytes by filwit on Monday May 04, 2015 @01:02PM (#9487432)
I was measuring with pcwalton's ruler.