8 ms·
Is Rust a “times 5” language? Is it that good? I can’t imagine any language being 5 times as productive as current mainstream projects.
by tobyhinloopen 6y ago
Is Rust a “times 5” language? Is it that good?
I can’t imagine any language being 5 times as productive as current mainstream projects.
- danielheath 6y agoThe right language choice for a problem space is a force-multiplier. I don't think 'several times more productive for the at least some of the cases where it was designed to excel' is a particularly strong claim; the devil is in asking 'which cases are those?'.
- adamnemecek 6y agoCompared with cpp yes. There are some bumps but God it's still incomparable.
- moldavi 6y agoI'm experienced in both, and IME Rust isnt that much better than C++. It's generally more fun than C++ and a bit safer, but all in all it's not 5x better, not even 2x... I'd place it around 1.1x perhaps. Each had a difficult learning curve to learn how to write safe code. At the end of both curves, I look back and see they were about the same.
- Ar-Curunir 6y ago?? Rust code is safe by default.
- 1tCKV3QfIo 6y agoLol tell me how you can implent a high performance linked list without using unsafe.
- moldavi 6y agoAnd it has a difficult learning curve to learn how to use it without unsafe =)
- adamnemecek 6y agoI also have experience in both. Cpp is just a pain.
- smabie 6y agoArray languages like APL, J, and k/q are probably much more than 5x languages.
- higerordermap 6y agoBecause they take exp(5) more time to read, you take logarithm to make it sound better. Seriously, I see this quoted without context all time. They are domain specific languages.
- smabie 6y agoI don't believe that. They are better at general purpose programming than regular languages. And I don't think they take longer to read in terms of distinct operations.
- codygman 6y agoDo you have any code examples of array languages being used for general purpose tasks? Clis, web applications, anything with lots of branching, games, etc?
- zik 6y agoRust is approximately a 0.5 language. It takes longer to write but results in more reliable code.
- hasperdi 6y ago“...more reliable code” citation needed
- AstralStorm 6y agoCompared to what? Java with its verbosity and relative lack of language features, partly hidden by powerful but complex libraries? (Partly shared by more potent C#.) C++ which is only slightly faster to write safely than Rust, you have to be careful to not use unsafe subset, and generic code is more verbose? C which has even fewer language features than Java and is harder to make safe than C++? Javascript where it is easy to write bugs, mostly of the null object kind, and hard to handle exceptional situations? With mediocre debuggers? (Also thus used with complex frameworks and libraries.) Python or Ruby, where instead performance may require dirty tricks using extra time? Perl? PHP? (Do these even have well working debuggers?) (Last 5 require additional code for tests due to dynamic nature to ensure correctness too.) Lisp, Haskell, SML or OCaml where there are fewer quality resources and libraries available to programmers? Perhaps the less used JVM/CLR or JS languages? (Groovy, Kotlin, CoffeeScript, F# come to mind.)
- samatman 6y agoC is much faster to write than Rust. It's the subsequent debugging that gets ya.
- perryizgr8 6y agoI find this sort of comparisons dubious. For me, who's a total rust noob, C is 10x faster than rust, because I need to keep looking up rust syntax for basic things like for loop. If I ever learn rust as well as I know C, I'm sure my speed won't be any faster or slower. For me, the time to think up a solution is the major chunk, writing it out seems to be nothing in comparison. So why would the language affect that in a meaningful way? Now, the one way rust can really give you time savings is the lack of entire classes of bugs. I spend 90% of my time fixing bugs in the code my coworkers and I have written over the past year. And most of them are really subtle memory and thread safety problems that are difficult to track down. If rust can eliminate that, I am willing to spend a year getting comfortable with the language.
- Galanwe 6y agoHonestly that kind of number dropping just makes me laugh. What does productivity mean? Is it time / feature? How do you do a proper comparison? I have been programming for 20 years, mainly in C, C++ and python. Very rarely have I felt slowed by the language itself. It's the architecture, the implementation tradeoffs, the understanding of the business, etc that take most of the implementation time.
- emj 6y agoI've been programming almost three decades, and I agree that the soft parts takes most of my time, almost all time honestly. But when I DO know exactly what todo then my colleagues are faster with a combo of Python and C, compared to just C. We can actually drop numbers for that. On the flip side you are probably right in the sense that this has more to do how we work than what language we use. I'm sure Rust would be fine, or if we had some C++ code base we were familiar with.
- cjfd 6y agoYes, agree with this. The very old separation between accidental complexity and intrinsic complexity from the mythical man month comes to mind. If you are spending less than 80 percent of your time on accidental complexities where exactly would a factor of 5 be coming from?....
- deleted 6y ago[deleted]
- Aeolun 6y agoDepends, using Typescript over Javascript has eliminated whole reams of ‘undefined’ errors. It may not make development faster, but it certainly prevents a lot of bugs.
- tasogare 6y agoSure if you start from a x0.01 language it’s not hard to find a x5 one in comparison.