20 ms·
> Rust: I'm not afraid to admit it - Rust is just too complicated for use as an aging and cranky solo developer. ... > As someone who actually hates to code f
by nu11ptr 4y ago
> Rust: I'm not afraid to admit it - Rust is just too complicated for use as an aging and cranky solo developer.
...
> As someone who actually hates to code for coding's sake and wants to Get Sh!t Done, Rust is just antithetical to my relationship with computers. I don't want to have to think about the language, and that's all Rust wants you to think about.
My guess: the author hasn't even tried it other than a cursory glance. I don't feel at all the way the author does about Rust. I do somewhat about Haskell I admit, although I like it just fine, but Rust is very much a "get it done" language, not something for academics. The only exception to this is the borrow checker, which isn't near the impediment most people think it is, but it does take a little practice. I learned it at 45 without issue, just a little bit of time. At this point, I code Rust as fast as any other language (probably faster when including debugging time - I almost never have to debug my Rust code).
- francasso 4y agoI have written around 30k+ lines of rust by now, and I have to agree with OP. I have encountered many situations where perfectly reasonable, zero copy, memory management that would be completely normal, fast and safe in C, it basically impossible to replicate in Rust (or at least I am not clever enough to figure it out). Are there other ways to structure the data that work in Rust? Yes, of course. Do I like them compared to the C one? No, not at all. Do I think that the additional memory safety that comes from Rust is worth it? In some use cases, yes
- insanitybit 4y agoIf you were clever enough to write it safely in C I can guarantee you'd be clever enough to write it in Rust.
- francasso 4y agoOh boy, that is so not true. Anything where the boundaries of the lifetimes are easily determined at runtime but unknown at compile time is extremely easy to model safely in C, and a nightmare in Rust. At least if you want the same level of performance and a similar modeling of the data
- nu11ptr 4y agoRust lifetimes are just the lifetimes of the memory, exactly the same as C. The only difference is you simply need to (sometimes) tell Rust where the memory for a reference comes from explicitly, where as in C you don't (but in C if you get it wrong your program will segfault, unlike Rust, or worse it might not...sometimes).
- skribanto 4y agoWell yes, lifetimes also exist in C, but it is only in Rust that they are compiler checked
- celeritascelery 4y ago> Rust lifetimes are just the lifetimes of the memory, exactly the same as C. Rust lifetimes are only the lifetimes of the memory that are provable by the type system. There are many valid lifetimes that are not provable. For example lifetimes that change at runtime, and self referencing lifetimes, or cyclic lifetimes. Newer versions of the borrow checker enable it to prove more lifetimes correct, but it will never be able to express all valid lifetimes of the actual memory. This means some patterns the are completely valid cannot be expressed in safe Rust due to the limitations of the type system, but can be expressed in C.
- insanitybit 4y agoAnd you can use unsafe.
- insanitybit 4y ago> Anything where the boundaries of the lifetimes are easily determined at runtime but unknown at compile time is extremely easy to model safely in C, I don't even know how to respond to this seriously. I guess just imagine me pointing to every blatant instance of this not being true.
- francasso 4y ago
- nu11ptr 4y agoI have written about 50K LoC of Rust, so fairly similar. I will agree that I have had occasional "lost days" with some very complex spots of code that would not have been a problem in a GC language. That said, I feel like I've made up for that at least 1.5-2x by my productivity and lack of bugs in other sections. That said, I can understand how it may not be for everyone. I love it, but there are some data structures you just have to code differently, and until you spend time thinking about how to do that, it would seem like wasted time you wouldn't get back. My personality may also be a fit: I'm very much a measure twice, cut once kind of person. I tend write my algorithms in pseudo code and sketch my data structures on paper before I touch the keyboard, so even in my "get it done" language I don't immediately just start coding always.
- deleted 4y ago[deleted]
- root_axis 4y ago> I have encountered many situations where perfectly reasonable, zero copy, memory management that would be completely normal, fast and safe in C So you think. It doesn't matter how smart you think you are, statistically speaking you're not smarter than a compiler.
- francasso 4y agoI think you are overestimating the expressive power of lifetime annotations in rust, and how smart the borrow checker is
- estebank 4y agoAnything you can express in C, you can in Rust. When it comes to pointer tricks you might have to use unsafe, but that is part of the language.
- platinumrad 4y agoIf only 50% of the community didn't think it was their job to scream at complete strangers for using that part of the language.
- nu11ptr 4y agoAgreed (unfortunately). There is too much of an obsession in avoiding unsafe at all costs in my opinion. When you consider all C/C++ is effectively written in an unsafe block then it seems a bit ludicrous to assume you would never ever use unsafe in tight, performant code.
- easterncalculus 4y agoSeeing some of the hassles with creating basic stuff like a linked list is part of the reason I have yet to use it seriously. I think I will eventually, but I certainly won't act like it doesn't come with a cost or that it always pays off.
- deleted 4y ago[deleted]
- Karrot_Kream 4y agoMost of the bugs Rust catches are memory related bugs and some data races in concurrent code. In any GC language the first is solved and there are concurrency frameworks available that prevent similar data race issues. TFA's author is comparing against Nim, a GC language. And in my experience of 10k LOC of Rust it's the same as the author's. Also does every criticism of Rust have to have a prominent rebuttal? TFA buried it in the appendix and the article is about a lot more languages than Rust, but here we are talking about Rust again. We all have our favorites, we don't have to stick out for them everywhere. Some people don't like Rust and that's okay.
- nu11ptr 4y ago> Also does every criticism of Rust have to have a prominent rebuttal? Ha, sorry - I just really love Rust and want others to at least try it. I passed on it for _years_ because I thought like the OP (I used to code in Scala - I personally find THAT takes cognitive load to remember all the features. Rust feels small to me in comparison). Rust made me LOVE to code again and I just think there must be others out there who would feel the same if they just tried it. > Some people don't like Rust and that's okay. Agreed, I'm sure it isn't for everyone.
- aprdm 4y agoMaybe you should try a language where people get a lot of work done in the day to day ? E.g: Python, Go... It seems crazy to me someone who code in Scala, now loves Rust. Brains are really something else :)
- nu11ptr 4y agoI've written extensively in about 10 languages including the two you mentioned. The current project I'm writing is migrating from Python to Rust. Python is not appropriate for large projects IMO and this one I wrote and am now porting to Rust is no exception. I do love Python for things up to 1000 lines or so, but after that you really need to test every single line, which is just a PITA. Mypy and now others help, but the typing isn't strong enough (although I've heard good things about some newer static typing addons). I have a love/hate relationship with Go, but after I found Rust I'll never touch it again. It simply isn't expressive enough which leads to code that is overly verbose. The lack of a decent enum, repeating nil pointer mistake, verbose and error prone error handling, the constant copy/paste (now semi fixed with generics). I do love that it strives to be a simple language, but strangely the Rust tooling is much easier to use, so I'm not convinced it hits the mark. I do love how fast it compiles, and that is the one thing I hate about Rust.
- moldavi 4y agoCan we please not do this? It's fine to give a different viewpoint, but it's surprisingly common that whenever someone says anything bad about Rust, a Rust user comes in to say that they just haven't used it enough. It's like saying "If you don't like my favorite movie, you just haven't watched it enough."
- wiseowise 4y ago> It's like saying "If you don't like my favorite movie, you just haven't watched it enough." It took you average movie time to learn whole entirety of language? Wow! And without sarcasm, yes, sometimes it is the case.
- pie_flavor 4y agoIt's not even the right category of criticism. The author talks about 'mathematical purity' which is something Rust sneers at. Spend just a little while with Rust and you can see that when the language is getting in your way, the driving direction it is pushing you in is towards code that will be maintainable. Which is still not about getting shit done, and is still a valid axis to prefer Go's rapid development cycle on, but if you cannot name the distinction then it is hard to believe you have spent enough time with the language to properly observe it.
- aquariusDue 4y agoI kinda agree, it's weird to me how people make a big deal about the borrow checker as if it's an evil spirit gatekeeping your code. And if you wanna go fast instead of writing maintainable code you surely can with stuff like unwrap(), clone(), Copy. In a way I think most people expect to pick up Rust more easily because they have expertise in other languages and are surprised when Rust feels like learning to code again, basically turning some ingrained assumptions upside down. It really is not the kind of language where you can glaze over the introduction chapter and churn a TODO app in the same afternoon in my opinion.
- 7sidedmarble 4y ago
- aew4ytasghe5 4y agoYour argument vs OP that tried rust, is that they should try rust until they agree with you?