Hacker Newsnew | past | comments | ask | show | jobs | submit | anon3132's commentslogin

~str is mutable. error probably doesn't need a mutable string, though. either it's just an overlooked API (json is an old part of the codebase, doesn't really see a lot of attention) or what pcwalton said about calling something down the line.


~str isn't inherently mutable; it's an owned string, and so is mutable if placed in a mutable variable.

The reason it's used here is so that the error messages can be constructed at runtime e.g. `fmt!("line %u: trailing characters", line_number)`, if it was using &'static str (i.e. a compile-time literal) then one could only use hard-coded error messages.


Dependent typing would be throwing out the entire type system, and also be incredibly ambitious. Dependent type systems are great, but I think the Rust team made the right decision here.


Why bother working on a proper distribution of a package that isn't anywhere near ready?

It will come in its due time.


Nothing in the syntax is fundamentally new, especially the semicolon turning an expression into a statement.

~[T] is just a vector.


All opinions aside: it doesn't matter that much what font you use. Use whatever you feel comfortable with. Switching fonts won't magically make you a better programmer.


Anonymous Pro is about 4th on my list of favorites, after Gohu, Dina, and Proggy


But does "surprisingly good" actually mean "good", or just "not as bad as every other proportional font"?


I use GohuFont (http://font.gohu.org/).

It is the best font I've used. I also like Dina (http://www.donationcoder.com/Software/Jibz/Dina/).

Consolas isn't bad either.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: