5 ms·
There is space in the world for a difficult complex language that produces low level operating system and library code, we just don't need to be writing every a
by flembat 3y ago
There is space in the world for a difficult complex language that produces low level operating system and library code, we just don't need to be writing every application using it, since ordinary people should also be able to program computers.
- dstanko 3y agoDo you perceive Rust programmers as extraordinary?
- foofie 3y agoRust is renowned for imposing a high cognitive load on all but the most trivial tasks. This is perhaps the worst traits a programming language can have.
- steveklabnik 3y agoThis is a thing people experience at the beginning, but once you get over the hump, for many, it is not descriptive of what it's like.
- foofie 3y ago> This is a thing people experience at the beginning (...) This is not an onboarding problem. This is a trait of the programming language, which only gets worse as a project grows. It's high time for the Rust community to start to get honest with themselves and stop pretending problems don't exist. It's already bad enough with the clusterfuck which is async Rust, and you're doing no one any favor to pretend that the borrow checker doesn't add a heavy cognitive load.
- dwattttt 3y agoI can't speak for others, but it absolutely has made life easier, on both small and large scales. Actually being forced to think about how long allocations and resources need to live turned random "takes days to figure out" bugs into an instant response of "oh, that was stupid of me to try doing that huh? Guess I'll try something else"
- stouset 3y ago> pretend that the borrow checker doesn't add a heavy cognitive load The borrow checker actively reduces cognitive load once you learn to adopt program designs that mesh well with its requirements. And those happen to be really good program designs across a wide range of axes.
- steveklabnik 3y agoI am sorry that you seem to think you know how I feel better than I do? The borrow checker means I have to pay less attention to memory management, not more. That’s why it exists. So I don’t have to worry about it. It catches my mistakes, I fix the code, I move on.
- pornel 3y agoIt’s quite the opposite. It may not be worth learning Rust for small simple programs, but it has an entire toolbox of features for dealing with complex problems and large programs. For example, dealing with multi-threading and low-level memory management without the assistance of thread-safe types and borrow checker adds mental overhead of verifying and upholding all the requirements manually.
- ReflectedImage 3y agoYou can do that via much simpler message passing instead. No "thread-safe types", no "borrow checkers", no "verifying and upholding all the requirements manually". The downside is you are sacrificing performance. Rust is for high performance, high concurrency applications where the developer can spend all day building them.
- frankjr 3y ago> Rust is renowned for imposing a high cognitive load on all but the most trivial tasks. By whom exactly? I think it's actually the exact opposite. It completely frees you from having to think about entire classes of bugs.
- foofie 3y ago> By whom exactly? You didn't read the article, didn't you?
- frankjr 3y agoDid you? It doesn't say anything about the respondents. "respondents that self-identify as a Rust user" is completely useless. Are they professional programmers? Are they just beginners playing with it? Do they know the language well enough to make an assessment?
- stouset 3y agoRust is memed for that by people who don’t actually program Rust. In practice it is absolutely the opposite. Rust makes really challenging problems extremely tractable, and takes an enormous amount of mental overhead off the table.
- erik_seaberg 3y agoThat cognitive load around ownership and sharing already existed in C and even assembly, we were just managing it very poorly without tooling.
- jvanderbot 3y agoI don't think GP meant that as "of extraordinary ability" just "tackling the common problems people write code for". Ordinary problems vs ordinary people.
- kybernetyk 3y agoextraordinarily masochistic, yes
- jvanderbot 3y agoI tend to agree. That is currently the systems world. C lives here by convention. Those people who intend to make systems and tools for systems that are semi-tightly integrated with those systems. I've worked with debian maintainers and they are some of the best C programmers around, and even they would use Python as much as possible, using C for the lower level stuff. I really believe this is where Rust will - and maybe even should - live. I do not believe it will replace C and Python in this example, but definitely C for those wishing to have another tool to use, and Python for some as well.
- Gibbon1 3y agoI think it's interesting that C still exists despite great efforts to kill it. First it was C++, then it was Java, now it's rust. Perhaps it would be easier to fire WG14 for incompetence[1], add a few things to the language, and update the standard library. [1] These guys haven't been able to come up with a non broken version of strcpy with 40 years of trying.
- jvanderbot 3y agoI'm an old programmer. I started with Java, learned Ada because I thought it'd be the next best thing. Then learned Cpp for windows programming, then php. Then a job with Java, then embedded work with C. And coursework in C. My thesis was a data structure implemented in C and Java. Then a decade and a half of Cpp because robotics and ROS dominates that area. Distrbuted robotics in Cpp. Along the way Python took off, I've used R and Matlab for research for years at a time. Now Rust is here. I have never stopped "thinking in C" from my few years of embedded work near the operating system or on bare metal. It's the language that makes the most sense when you study CPUs. The concepts match OS apis. It is simple to write C glue for any of the above languages. C libraries are not mangled. Etc etc. C feels like the language that computers and software are made with, and all other languages just try to hide that by building someone on top of it. I say that as a feeling but it might just be true. Now Rust is here and I love it when it tries to be like C. It's clean, pure, I believe the compiler when it says something (not like Cpp), and the mental leap to the borrow checked matches ownership dynamics from C pretty well. I hate it when it tries to be like Python or JavaScript, pulling 1000 libraries for something flashy and simple. But that's us, the programmers. The language is strict because it's the core of C without the generality. If C is the wilderness, Rust is the national park. It's beautiful, sparse, you can get lost for days, but it's safer.
- dcan 3y agoI’m using Rust in embedded systems for this reason - sure C is the ‘native’ language, but the engineers before me couldn’t tame the beast and made barely working software. The HAL provided by STMicro is functional but riddled with side-effects and is incompatible with an RTOS.
- pjmlp 3y agoInferno and Android are two good examples on how to do it, with a clear separation on the low level stuff, and more developer friendly and safer userspace. Not the only examples, there are plenty of other systems following similar approaches.