Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It imposes design constraints that in the end work out for the better.

I feel the jury is still out on this. It does impose design constraints that remove a certain subclass of errors, whether this correlates to actually causing better designed programs in the sense of readability, maintainability, etc. I'm unsure. I understand the desire for this to be true and I feel that some of the fanaticism around the language is the belief that this is true. Developers like to have the 'one true way' to solve problems. Go's popularity I feel is in part because of this as well but achieved it by having a bare bones language with less options instead of a restrictive compiler. If you take the 'restrictive compiler' argument to its logical conclusion for a program that accepts input x and produces output y there would only be one valid way to code this program. This would be good in the sense that presumably the compiler has proven that your program works and is correct. On the other hand though I have no inclination to believe that this program would be the most understandable, modifiable way to get from x -> y.



Also, there are many classes of errors that Rust doesn't help solve, but which people seem to get the impression that it does aim to solve, which can be confusing and counterproductive when choosing a language because of the classes of errors it aims to solve (often a big motivator in both designing and choosing a language; see Swift and Go).


>Also, there are many classes of errors that Rust doesn't help solve, but which people seem to get the impression that it does aim to solve

What are some of those?


The big one is memory leaks. People also assume “race conditions” instead of “data races.”


Thanks for the info. I need to look up the latter point, the difference between the two. Saw it mentioned in an article or book about Go too.

Looked it up, found these links, for anyone interested:

https://blog.regehr.org/archives/490

https://stackoverflow.com/questions/11276259/are-data-races-...


Any time! And yeah, those links are excellent.


Cool, good to know :)


FWIW, Rust does help with both of those, but it doesn't resolve them entirely. This is nitpicking slightly but the original comment did say 'help'.


Fair!




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

Search: