ksec
15 hours ago
>Rust is a superior technology to C++....it disciplines you to do the things the right way.
>But Rust is better in the same way that Betamax was better than VHS, Mastodon is better than Twitter, Dvorak keyboards are better than QWERTY, Esperanto is better than English and Lua is better than Javascript: in communication technologies, adoption and critical mass are 90% of the game and the other 10% are bikeshedding, at best. And programming languages are a communication technology, they're means to communicate ideas to other programmers.
Love this. May be I should repost this every time there is an argument about Rust. And to expand on that, in communication technology, the one easier to use is going to get wider spread / adoption. And while there were never much hype around Go, I think it is a very good example.
But a lot of Rust [1] ideas are now being polished and used elsewhere like Swift. I am sure we will continue to be experimented in other languages and real world to test whether the trade off is worthwhile.
[1] ( ok may be Cyclone or something earlier in case someone wants to nitpick )
carlmr
6 hours ago
>the one easier to use is going to get wider spread / adoption
Between Rust and C++, this is Rust. In C++ you need to a lot more memory safety verification in your head, there are thousands of footguns that you need to be aware of at all times, the template metaprogramming facilities are really hard to grok with their weird syntax.
Rust is strict, but for the kinds of applications that you would replace C++ in this makes it a lot easier to learn.
I think the sentiment that Rust is hard comes from people that come from managed languages (Python/Java/C#) that aren't used to manual memory management. From that perspective Rust is indeed hard.
chucke1992
an hour ago
C++ has much more bigger inertia. It is like the "default" for all the areas where it is being used. So when learning a language people would rather go to C++ first and then to Rust, if they are really planning to work in corresponding area (game dev etc.). Or even go to C.
Rust will probably replace C++ in some areas where it is a legacy app (or part of the app) that is not changed frequently anymore.
synergy20
13 hours ago
Golang is not much more widely used comparing to rust? both are 17+ years old and they're around 2% of the market.
serbuvlad
13 hours ago
I think a question that must be asked is "what market?" Go is a very niche language in it's application: it is ubiquitous in the Docker/Kubernetes DevOps world. It's also successful as an alternative to Node in the server/micro services world. And there are many CLI tools written in it (but CLI tools can be written in any language whether or not it has critical mass - there are popular ones even in Haskell!).
Excluding CLI, Go's use cases virtually did not exist when Go was created. So Go was "the right language at the right time" to grow up with it's niches (decent performance, easy to learn, easy to reuse library code, easy to deploy, easy concurrency). It is virtually non-existent anywhere else.
On the other hand, Rust competes in exactly the same high-performance/low-overhead space that C++ dominates. Because of Rust's complexity, it is very unlikely that it can compete anywhere else. Rust must displace C++, or at least be a viable alternative to it.
kstrauser
8 hours ago
I wrote a BBS in Rust. It need sleep neither high performance nor low overhead, but it was a delight to write. For example, the compiler error messages are so detailed and explanatory that I learned a lot of the language from it telling me what I was doing wrong and offering suggestions.
I would’ve written it in Python a year ago. Now I wrote it in Rust because it was genuinely fun and the results came out nicely.
I have zero interest, none, nada, in C++. (Readers: please don’t try to win me over. I know more about the subject than you might think and it’s an informed opinion.) For me, Rust doesn’t compete with C++ at all. It’s probably replacing my Python coding more than anything else. The output looks and feels quite Pythonic, but with strict types and AOT compilation to native code. I’m loving it.
jjav
7 hours ago
> I wrote a BBS in Rust.
A BBS? Does this have a different meaning now than in 1986? Where do I dial up to it?
binary132
3 hours ago
What do you mean when you say “Go’s usecases did not exist”? It was invented to write concurrent servers in that would have readable, performant implementations suitable for use across teams, to make code review faster and better, to displace C++, and to prove that certain design principles from Dis / Plan9 were superior to those in Java. I’m not really clear how those usecases did not exist at the time. If you mean “Go is for scheduling containers”, you are wrong, but just because one popular application exists that doesn’t imply that is “what it’s for”.
alfiedotwtf
11 hours ago
> Because of Rust’s complexity
I would argue there is 2 types of complexities here:
1. Complexities when developing (Rust) 2. Complexities once running in production (C++)
I’d much much prefer to have errors and frustrations developing than users dropping out of the sky at 40,000ft
dartos
9 hours ago
The issue is that for all rusts complexities, it can still have production issues.
bennettnate5
an hour ago
... and for all of C++'s perceived simplicity compared to Rust, it can still have compilation issues (looking at the compiler errors output by template classes can be a downright nightmare)
zozbot234
2 hours ago
Rust is not "17+ years old" in any relevant sense. Rust 1.0 only came out in 2015, and the first genuinely usable version arguably was only in late 2018 after non-lexical lifetimes (NLL) were added. Golang is a lot older than Rust, practically speaking.
BWStearns
13 hours ago
I largely agree with the "programming languages are a communication technology [thus critical mass is critical]" bit, we spend more time reading and explaining code than we do writing it. That's why I'm really hopeful for Rust web frameworks like Loco to get to mainstream-ish.
There are just _so goddamn many_ webdevs that a reasonably popular web framework can bootstrap a language out of the mid-popularity uncanny valley. On the flipside, a lot of webdevs are interested in Rust, but aren't really personally set up to do some embedded or systems stuff, so the activation energy for a given developer getting into it remains slightly higher than other languages.
michaelmrose
12 hours ago
Beta wasn't better. VHS matched broadcast quality for less money and substantially more runtime per tape.
Dvorak isn't particularly better because typing speed isn't worth optimizing for if you are good enough and the difference if any is small.
Lua isn't better than js if it needs to run in the browser natively.
dismalaf
2 hours ago
> Dvorak isn't particularly better because typing speed isn't worth optimizing for if you are good enough
Is Dvorak even quicker? I tried learning it and found some quirks, for example, lots of English words end in "ght" (thought, bought, draught, taught, etc...) which is extremely awkward to type on a Dvorak layout (you need to strike all three with one finger whereas on QWERTY it's split between both hands so you can alternate).
I agree with your point though. I type 80+ WPM on QWERTY with no maintenance and honestly, I type way faster than I can even think about what to type (especially for programming). Now that my college essay days are way behind me, I don't think it even matters.
ranger_danger
11 hours ago
As with most things, I think that not only is "better" subjective, but such dogmatism is a sign that you are not considering that other relevant perspectives or context may exist that can disagree with you. I think true intelligence by definition requires humility and realizing that we can't know everything, there are things we don't know that we don't know, and the world is not so black and white.
FpUser
12 hours ago
>"Rust is a superior technology to C++....it disciplines you to do the things the right way."
It is not. The only thing it disciplines one to do is to bend them to confines of particular safety model. And Rust creators do not have the ultimate authority to say what is the right way anyways. No one does. There are multiple concepts fitting different situations. Rust ignores many. As a general language it looks way too opinionated to me.
zozbot234
2 hours ago
> Rust ignores many [safety models]. As a general language it looks way too opinionated to me.
I'd like to see some actual examples of this, and I assume many Rust devs would react the same way. In practice, most proposed "safety models" that Rust complains about don't really work when considering that code must be enabled to interact not just within a single module but rather across modules. This is where Rust nudges developers to make the right choices for successful programming "in the large", while still providing the "unsafe" featureset for safety assurances within a single, self-contained context.
macgyverismo
6 hours ago
This is what keeps tripping me up, it is very difficult to be both general and not opinionated. C++ is general, you can use it however you want. Especially in many unsafe ways. Like it or not, this is great news for a general low-level language. A language that tells me how to build, where my files should live and what tools I am to use may be a great user experience, it is not very general. Still not sure what to make of this and where I land on this.