6 ms·
>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 VH
by ksec 2y 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 )
- synergy20 2y agoGolang is not much more widely used comparing to rust? both are 17+ years old and they're around 2% of the market.
- serbuvlad 2y agoI 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.
- alfiedotwtf 2y 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 2y agoThe issue is that for all rusts complexities, it can still have production issues.
- bennettnate5 2y 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)
- dartos 2y agoFor sure. But C++ devs aren’t trying to convince rust devs to change their stack.
- alfiedotwtf 2y agoBut I can guarantee C++ developers are trying to convince the world that C++ is safe enough for everyone
- dartos 2y agoCan you? I’ve never heard that from a C++ dev. I don’t think any C++ dev worth talking about thinks that C++ is particularly safe, just that (modern) C++ has plenty of powerful safety features. (Like smart pointers. Analogous to rust’s Rc and Arc) So much so that it approaches rust’s safety promises in the most common cases. In what I’ve seen, C++ devs are largely unconvinced that rust is more safe than modern C++ in the most common cases, but rust has a much higher complexity cost, especially when integrating with C code. It’s really hard to convince hardcore C and C++ devs to use rust, because most of the touted features are seen as fixes for skill issues. Not because they believe that rust is not safer.
- zozbot234 2y agoRust 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 2y agoI 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 2y agoBeta 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.
- ranger_danger 2y agoAs 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.
- michaelmrose 2y agoGood point. At the cost of relearning typing some folks may increase their speed but its not easy to determine if they would have won similar gains spending time improving habits with qwerty. That said its nearly irrelevant because for most jobs typing speed isn't a limiting factor for those with average typing speed for proficient users.
- dismalaf 2y 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.
- FpUser 2y 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.
- macgyverismo 2y agoThis 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.
- FpUser 2y ago>"Like it or not," I do not give a flying fuck. Language is a tool. I work with many languages. If clients wants language XYZ then XYZ it is. My private opinion does not matter in this case
- johnnyanmac 2y ago>If clients wants language XYZ then XYZ it is. I don't care how much you pay me (well, not in a practical sense), I'm not going to bash a bunch of screws in with a hammer. In my industry, the languages and tools do in fact matter and impact the quality of the project. It's hard enough as is without some unreasonable clients saying "oh yeah, can you make this in powerpoint?"
- FpUser 2y ago>"I'm not going to bash a bunch of screws in with a hammer." My clients are not that dumb.
- carlmr 2y 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 2y agoC++ 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.
- grayhatter 2y agoI'm used to writing C, and think pointers are easy to understand. I wouldn't call rust 'hard' to learn, but it is without a doubt painful. You also aren't doing manual memory management in rust either... I'd assume the sentiment comes from the irrelevant hoops rust makes you jump through to just compile something simple. You don't need to be aware of 1000s of foot guns for every block of non rust code. But you do have to remember dozens of pedantic rules, or stdlib wrappers just to trick rust into allowing you to compile your simple/demo code.
- ipdashc 2y ago> You don't need to be aware of 1000s of foot guns for every block of non rust code. But you do have to remember dozens of pedantic rules Have you tried using rust-analyzer? I'm usually a bit of an IDE skeptic, but Rust is one of those languages where tight integration with the IDE really helps IMO. It's night and day, I honestly wouldn't want to write Rust without rust-analyzer, but with it it's quite pleasant.
- Koshkin 2y ago> they're means to communicate ideas to other programmers This is somewhat of an anthropocentric point of view. (In particular, assembler is as far as it gets from this.)
- saagarjha 2y agoPeople can and do write assembly code for others to read.
- johnnyanmac 2y ago>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. Which frustrates me in many respects. Especially in a specialization like tech where the audience should be used to picking up new tools to make for the best project. But I know most projects are made with business constraints in mind (i.e money and time) and cheapest almost always wins.
- baranul 2y agoMore than just Swift has been influenced by various ideas in Rust. Zig and Vlang are among such other newer, easier, modern features having and somewhat safer languages who claim and show influence. Languages like Golang, can make a good argument of being the VHS to Betamax, because it is among the easier to learn memory safe languages. Golang is much more strongly positioned to take over C#, Java, and even Python spaces. Not just technically, as a language, but because of the large corporate machinery and jobs behind it, that is the result of being a Google product. As for Rust's main claim to fame, memory safety, lots of other lesser known languages are hard at work to become direct viable alternatives to Rust. Some of them are: Hylo, Vale, Lobster, etc... Vlang, while not quite trying to aim as high as the others (on memory safety), uses an optional GC (like Nim and Dlang), and is among the safer languages. It then becomes a question of how much the extra burden of Rust is needed, for the project in question.