I can’t imagine any language being 5 times as productive as current mainstream projects.
I can’t imagine any language being 5 times as productive as current mainstream projects.
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.
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?'.
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.)
It's the subsequent debugging that gets ya.
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.
I also know and are fluent in much weirder, atypical languages, almost esolang, of CRM114 and Faust, and rare ones like Nemerle and Vala.
Rust is pretty pedestrian compared to some of these, rather powerful and generally nice. Writing in Rust feels like writing in a cross of C# and C++20 (less verbose) with a sprinkling of SML/OCaml inspired syntax.
Main slowdown I got was having to write some foreign function interfaces, but it was as nice at it as Python with Cython, nicer than say Vala or Haskell. Much nicer than Java FFI - JNI. Also the common build and package system Cargo was a bit different from what I'm used to, but not altogether bad.
1. The compile times. But those are comparable to C++.
2. The borrow checker and ownership rules. But you get used to those rules and eventually they are ingrained far enough into your brain that you barely run into problems with them anymore.
However one thing that is overlooked entirely here is that writing code doesn't just mean writing code, but also running and testing it, which due to the increased reliability are shorter if not even greatly shorter than most other languages.
So especially compared to C and C++ you end up writing code a lot faster.
Seriously, I see this quoted without context all time. They are domain specific languages.
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.