7 ms·
This is why Rust will eventually become the next C++ - it's becoming just as bloated with type theory, a cumbersome syntax, and will eventually ignite a begrudg
by ilovecaching 4y ago
This is why Rust will eventually become the next C++ - it's becoming just as bloated with type theory, a cumbersome syntax, and will eventually ignite a begrudging dislike by the people that have to find a subset of the language to make sense of just to write simple programs. Everything about this language is overcomplicated by language enthusiasts.
The best thing for Rust over the next few years is for it to fall to the wayside while saner approaches like Hare and safer C syntaxes take center stage.
- gouda-gouda 4y ago
- llanowarelves 4y agoThat's why I don't think it's worth dropping modern C++ for it. Only major thing C++ was missing that I wanted is modules. Yeah you have to have high enough agency to use a subset of the language, but so what? I dont plan on having 300 interchangeable human NPCs smashing keys on it, like Go was designed for.
- echelon 4y agoI can imagine a very similar argument being made for punch cards.
- llanowarelves 4y agoHow hard is it to minimize inheritance, use containers in standard library, and use smart pointers though? That's 90% of the difference between pre-c++11 and post-c++11 best practices. And a couple other "dont do this" rules.
- paulgb 4y agoI don't get it, where's the bloat here? By using consistent rules across the language, Rust is requiring developers to keep less in their head. The author acknowledges this: > Newer users find Rust easier to use and more consistent; they don’t have to learn the “edges” of where one thing works and where it doesn’t. E.g. currently, Rust users have to know that if they want to use async on a trait, they need to add a dependency to the async_trait crate. Soon they won't.
- ilovecaching 4y agoI have primarily worked on kernels written in C during my career, but I read through the official Rust book and wrote a small microkernel using Rust and my opinion is that Rust is already everything I hate about C++. It's already a huge language with a large upfront learning curve and there's no hope of mastering it as it's already grown so large that it could never fit in one person's head. Instead of focusing on solving my task I'm often thinking about how to deal with the language itself - a hallmark of large languages that promise the world if you just takes days learning about higher kinded type systems. C has innumerable problems, but at its root it's a simple language that is easy to learn, and it's been fabulously successful because it's small and *doesn't* try to abstract too much over the architecture you're working on. My feeling is that Rust is being pushed by people who write application level code because they heard that C was bad and programmers are simply enthralled by overcomplicated programming languages because it gives them something to read about.
- mdtusz 4y agoI'm curious why you think it's too big to master. There's certainly a lot to the language, but it's design means that these various facets are largely contained to their area of effect. I'd be confident in the assertion that most rust developers don't need to understand much more than the basics of the type system, traits, lifetimes, and the surface levels of async. The biggest benefit to the language is precisely that all the Lego pieces fit together and you simply don't need to worry about (in Lego parlance) "illegal moves". Whenever I write C or C++, I'm constantly worrying about whether or not I'm doing something incorrectly and potentially writing dangerous code. In rust, this mostly disappears and you can focus on the actual problem domain you're working in rather than computer science problems.
- aussiesnack 4y ago> I'm curious why you think it's too big to master. Many of us do find Rust very hard to get to grips with, however much we're informed by Rust advocates that it isn't! I don't know if there's any readily available way to be objective about this? I think all we have is attestation. Here's Chris Keathley (of some Elixir fame): > I've written a non-trivial amount of Rust code (50-100k lines) .. and I feel like I barely understand Rust as a language I don't think that's an uncommon perspective.
- ZephyrBlu 4y agoAs someone who generally prefers high level languages (Ruby, Python, JS) I'm enjoying Rust because unlike C and Cpp, I don't really have to care about memory. I don't want to spend my time thinking about memory allocations and deallocations. Rust lets me focus on logic like a high level language does and the compiler tells me whether what I'm doing is memory safe or not. I'm vaguely aware of copying/cloning values, but Rust is pretty performant out of the box and I don't end up doing it very often.
- ilovecaching 4y agoIf you don't need to care about vm, you probably should be using a GC language. If you do, you certainly need to understand vm.
- ZephyrBlu 4y agovm = virtual machine/memory? I'm porting this Python library to Rust: https://github.com/Blizzard/s2protocol https://github.com/Blizzard/s2protocol. For the shitty, first pass prototype code I've written so far I've seen a ~30-40x speedup compared to the Python implementation and a ~2x speedup compared to a Go implementation written by someone else: https://github.com/icza/s2prot https://github.com/icza/s2prot. That is why I chose Rust over a GC language like Go (E: I also wanted to learn it ofc). It's a lot faster out of the box, even without me having a strong understanding of memory operations.
- switchbak 4y agoVirtual memory != Memory management, your abbreviations are confusing.
- ilovecaching 4y agoSorry, I don't normally work outside of the kernel. To me vm is a common abbreviation with a well understood meaning.
- xyzzy_plugh 4y agoIt already is the next C++. It's a powerful language full of incredible abstractions but sadly that attracts incredibly smart developers who worship at the altar of complexity. I enjoy rust for what it is, and I've had fun writing programs in it. You couldn't pay me to work with it in a professional capacity involving peers. I'll stick to Go, where my code reads and writes like everyone else's.
- 3a2d29 4y agoBut Go can’t be used for all low level programming. Of course a GCed language is easier to read, it’s simpler at the cost of performance. Rust complexity is more of a debate about low level programming below Go. Where only C/C++ and Rust exist. Can there be a simpler language in that space?
- AnimalMuppet 4y ago> Can there be a simpler language in that space? Maybe not. The problem is that you have to have a language powerful enough to do all the things, even the things that haven't been thought of yet. That means, basically, that you have to be able to manipulate raw memory. You can't depend on a library or a language built-in, because you have to be able to write the library, and do things for which the builtin doesn't exist yet. And then you have the problem of not blowing yourself up with that power. That comes with 1) all the danger of C, 2) all the complexity of C++, or 3) all the difficulty of the borrow checker in Rust. If a fourth language appears with the necessary power, it's going to have equivalent drawbacks.
- int_19h 4y agoThere are far more languages in that space than just C and Rust. Zig is one of the more recent examples, but e.g. Ada is also around, as is Delphi and many others.
- pjmlp 4y agoOf course it can, there are companies shipping products written in bare metal Go. https://www.withsecure.com/en/solutions/innovative-security-hardware/usb-armory https://www.withsecure.com/en/solutions/innovative-security-... https://github.com/usbarmory/tamago https://github.com/usbarmory/tamago