9 ms·
Rust severely disappoints me
- Manishearth 10y agoThis post is pretty inaccurate. A lot of this is discussed in the reddit thread (https://www.reddit.com/r/rust/comments/5nl3fk/rust_severely_disappoints_me/ https://www.reddit.com/r/rust/comments/5nl3fk/rust_severely_...) For one, string concatenation is the second example in the documentation for strings, and is very googleable. I can't believe the author linked to a 2 year old closed issue about epoll and assumed that the single comment there is still applicable. mio has existed for more than a year now. You can find epoll crates on crates.io. The further comments about CSP have to do with solely the stdlib not wanting to have selection. It is true that there's no consensus on which third party crate to choose, but this is sort of the spirit of Rust's ecosystem; you can just pick the one that fits your needs best. Currently, however, the Rust team is working on a "blessed" async IO solution that the ecosystem is converging on (http://tokio.rs/ http://tokio.rs/). I'm not expecting a newcomer to the language to know that, this comment is more of an FYI for folks who are interested in using Rust for this in the future. While Rust doesn't have a BDFL, the core team is a pretty small (and mostly like-minded) group, and they do set design direction and priorities. ------------ It is true that Go is simpler than Rust and easier to pick up. I like Go for this (and other reasons). Rust does take effort to get started with. We can improve here, but I'm skeptical we'll ever reach the same level as Go.
- jandrese 10y agoIMHO, the author of the article ran into the same thing I did when starting Rust. You look at the official docs then want to do something slightly different so you hit up Google and run across mostly obsolete information and examples that don't work anymore.
- Manishearth 10y agoYeah, this has been slowly reducing, but is still somewhat an issue. Not an excuse to rely on a two year old closed issue, though.
- flukus 10y agoI run into this a lot with other languages (c#). Google thinks older == better. It's terrible in any not so stable environment.
- CalChris 10y agoThe learning curve was far worse than I expected This has been true for me as well. Rust seems to have gratuitous syntax. If C did something and there was another way to do it then that other way was chosen. With C if you want to return the value 42 then you say return 42; With Rust you say 42. There is a return statement; it just can't return anything. If you say if (a == b) Rust says: warning: unnecessary parentheses around `if` condition I'm willing to put up with this nonsense because of the safety guarantees. But really, it reminds me of Bananas: In addition to that, all citizens will be required to change their underwear every half hour. Underwear will be worn on the outside so we can check. Edit: I got this a little but not a lot wrong. return 42 is supported but then it isn't clear at all why 42 is necessary. So my complaint of gratuitous syntax stands as does my respect for Rust's safety guarantees.
- steveklabnik 10y ago> With Rust you say 42. This is, strictly speaking, not true. Rust is an "everything[1] is an expression language", and so if you have some sort of block, it will evaluate to its last expression. But if you want to do an early return, you must write it, or if you don't like the default Rust style, you can write it. This is consistent with other languages, just not C. 1: not literally everything, but most things.
- CalChris 10y ago> This is consistent with other languages, just not C. TIOBE Index January 2017. The top 10 languages are Java, C, C++, Python, Visual Basic, Javascript, Perl, Assembly, PHP Except for Assembly, where the comparison makes no sense, all of these languages have return expression. Yes, there are other languages that use last expression but they are most definitely not common languages and the most common languages use return expression. It just seems unnecessary. It isn't clear what they got out of it.
- GFK_of_xmaspast 10y agoPerl has implicit return.
- dj-wonk 10y agoI understand that new things can be hard. But valuable skills pay back in more ways than one. Yes, getting comfortable with Rust takes time. I'm still on that journey. However, I am encouraged the simple maxim: "Discomfort is often a good sign of learning." Learning and productivity are coupled. If you stop investing in learning, your productivity will not grow optimally. (Argument from the "Capability Trap", a systems dynamics assessment of working harder versus working smarter.) I'd like to share two personal examples of tough learning curves. 1. Learning inferential statistics deeply can be challenging sometimes. It requires that I think differently and more precisely. Still, I have found it rewarding. 2. I had a large amount of cognitive dissonance in a particular class in graduate school where we read widely and shifted perspectives on sustainable development every week. The economic, environment, moral, human, and architectural aspects of the topic do not neatly reconcile. This awareness is really important and builds the ability to connect with people with many different worldviews without dismissing them. It seems to me that sometimes people don't see why a set of new concepts or approaches is worth the effort. I get it. I can see why someone might get disappointed at first. But I think such a view is too narrow. Once you get over the hump, I have found the learning curve pays off.
- newsat13 10y agoSorry, this logic makes no sense. Just because you are having discomfort does not mean it has any value.
- dj-wonk 10y agoI think you would agree that learning is not only about adding more information to your brain. Concepts must be reconciled. For many people, feeling some internal inconsistency (call it cognitive dissonance if you like) is strongly associated with challenging one's preconceived notions. The trigger is often external stimulus. That's why many people find that feeling uncomfortable is a useful proxy to pushing yourself intellectually.
- newsat13 10y agoI honestly don't understand what you are talking about.
- GFK_of_xmaspast 10y agoThe obvious explanation is that ESR is not actually as masterful a programmer as he thinks he is. (Also of note that it only took two comments before one of his readers starts getting mad at the SJWs)
- eridius 10y agoWow, the comment thread on that page is incredibly toxic. I still don't understand how the commenters there think that a discussion about the technical merits of a programming language has the slightest thing to do with social justice.
- CyberDildonics 10y agoI agree with you and also think the comments are toxic, but there is no doubt that Rust decided to mix their language with the idea that the creators need to dictate what is ok to say.
- eridius 10y agoPlease elaborate. The only thing I can think of that comes close is the fact that the community forums for Rust discussion that are moderated by the Rust team have codes of conduct. But that's a very good thing! And if you don't like that for whatever reason, then you can go use some discussion forum that's not moderated by the Rust team. Nobody said you're forced to use r/rust, or #rust-lang, or users.rust-lang.org to talk about Rust. But regardless, rules of conduct on public forums are not the same thing as saying that the language itself is in any way associated with social justice.
- CyberDildonics 10y agoBut you do agree they dictate what is ok to say on reddit, irc, newsgroups, and github correct? I've seen people scolded for saying 'hey guys'. You can say that is a good thing, but to me it seems like a passive aggressive way to show authority over someone with a virtue contest. The problem is that it turns a meritocracy into something that can be sidestepped and warped by one person claiming to be offended. In practice someone scolds another person for something that they say might offend someone reading. I also haven't seen any sort of evidence that it solves a problem. It seems to me to be a solution in search of a problem. I don't think it magically takes care of toxic people.
- serge2k 10y ago> I have discovered that Rust is not, or not yet, a language suitable for long-term infrastructure work because it's missing an API and you can't write your concurrency the way you want. I don't think that's a very strong argument. That learning curve is nasty though. Too much is too tricky to get right.
- cpeterso 10y agoIt seems like there is an opportunity for Rust to improve its learning curve by adding an "easy std" library that wraps some of the byte juggling headaches. People coming from scripting languages or who just want to write a quick program, for example, might not care that using a + operator to concatenate two string objects might implicitly allocate memory. And they still have strong static types and the option to access bytes when necessary.
- eridius 10y agoPeople who want to write code as if it were a scripting language might want to just pick a different language than Rust. Nobody said everybody has to write in Rust. Either Go or Swift might be a good choice for those people.
- mkawia 10y agoAs rust developer from a higher-level languages , I really struggled with that ,then I discovered format!() macro ,maybe they should make it more visible to new developers.
- carlosdp 10y agoThere is no such thing as a "simple IRC server" =P Never a great choice to evaluate a language with imo.
- newsat13 10y agoRust is trying to solve well known problems. What is unique about rust is how it solves them. To emphasize that, what is required is a document that clearly explain how it's done and how the syntax of Rust is helping the cause. Instead the tutorial is filled with printf! (Saying it's a macro. What is ! doing there? Why is it needed) and then &mut Str (I already noted Str is mutable, why do I need mut again). The tutorial comes across as very apologetic (using phrases like it's complex, will read later etc) instead of being confident about the issues being solved. What I find lacking is a document that can explains quickly what is being solved, how it's being solved and general overview of the language. I don't know of any language that cannot do this. Nobody is picking Rust as the first language. One should just assume that people already know C/C++/Java etc coming to learn rust. I will appreciate any links to help my Rust journey (please no books!).
- steveklabnik 10y agoWhich tutorial are you referring to?
- eridius 10y agoWhy no books? You're explicitly rejecting the most useful documentation there is. Maybe you mean no printed books by third parties, which would be a reasonable restriction, but https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/ is online and written by people involved in the rust language development.
- steveklabnik 10y ago... and http://rust-lang.github.io/book/ http://rust-lang.github.io/book/ is even better!
- eridius 10y agoIs that the new version of the book? I was wondering where that was. I grabbed my link from rust-lang.org. When will the new book take its place?
- smcdow 10y agoI don't have the time to learn a new language that doesn't expose POSIX/Linux APIs. I may never use them, but I want them there in case I need them. You never know.
- steveklabnik 10y agoRust does, by the way.
- Ralith 10y agoOne of Rust's selling points is literally that it has very easy zero-overhead C interop.
- wyldfire 10y agoLike in Python, you're free to call your libc's exported symbols directly. IMO it's a good thing rust doesn't support open()/read()/write()/close() directly and doesn't document it alongside the higher level abstractions.
- kibwen 10y agoPrevious discussion on /r/rust: https://www.reddit.com/r/rust/comments/5nl3fk/rust_severely_disappoints_me/ https://www.reddit.com/r/rust/comments/5nl3fk/rust_severely_...