5 ms·
Because C programmers are 1000x more common than Rust programmers. Edit: "only" 50x according to TIOBE.
by thedance 7y ago
Because C programmers are 1000x more common than Rust programmers.
Edit: "only" 50x according to TIOBE.
- codr7 7y agoIt said Rust and/or C though, and I imagine learning Rust is pretty easy compared to C from what I've seen.
- gameswithgo 7y agopeople who are very good at C or C++ will be able to learn Rust pretty quickly yes. People who LIKE C probably won't like Rust though. Its more like C++.
- dpc_pw 7y agoFor what it's worth, I used to be big on C, and grew to very dislike C++ (because it's simple insane). Rust is my language of choice for years now. IMO, Rust shares the same inner-simplicity that C has, but combined with ability to build and use bulletproof higher-level abstractions. The same way I roughly knew what machine instructions (roughly) my C code produces, I know what machine instructions my Rust code produces.
- dirtydroog 7y agoWell yes, because LLVM generates the machine instructions
- jfkebwjsbx 7y agoRust definitely does not share the simplicity of C. It is the equivalent of C++, not C. You can write code which you cannot guess the machine code, as soon as you use any of the abstractions, just like C++.
- saagarjha 7y agoRust’s standard library is about on par with C’s, though.
- thedance 7y agoRust standard library is dramatically more useful than C’s. C doesn’t offer any kind of collections in its libraries. Every C project just grows its own differently broken hash maps and linked lists.
- saagarjha 7y agoCompared to C++, Rust's libraries are severely anemic, especially in the areas where C++ is strong at such as collections, algorithms, and metaprogramming constructs such as type traits. Rust's standard library is better than C in certain areas–you identified one, which is dictionaries. (Linked lists are hard to provide a useful, performant API for; it's often better to roll your own–especially in C–than rely on a library to do it for you.) But even without including C's POSIX libraries, Rust seems to be missing things like random number generation. I general, yes, I would probably say that I would prefer Rust's standard library over C's, but it's not huge in any sense and much closer to C's than C++'s. In any case, I came into Rust thinking it would be like C++, and ergonomically it certainly is. But its standard library is nothing like C++'s and this caused me disconcertion until I began treating it like C's, and being happy whenever it provided me anything beyond that rather than disappointed whenever it was missing something I found useful.
- danudey 7y agoArguably not. Rust has a lot of things that C doesn't, like classes, lifetimes, and the borrow checker, which can be jarring to deal with for programmers used to other languages. And, unlike most other languages I've seen, you can't just sit down and write a "bad" Rust program and then refine your abilities; the compiler won't let you do the "bad" things, so you have to get everything write from the word go.
- steveklabnik 7y agoRust does not have classes.
- hombre_fatal 7y agoIn the wild, the meaning of class ranges from whatever it means in the bowels of theoretical OOP, to a struct that has thing.method() invocation syntax. I'd wager about 99% of people don't get more academic about what classes are beyond the latter definition since it's the only way in their language to create a group of state and then associate some methods with it, which is exactly what Rust has.
- steveklabnik 7y agoI think in the general case, you are absolutely correct. In a sub-thread comparing language features of two languages to each other to compare their overall complexity, I think it pays to be precise.
- codr7 7y agoFrom what I understand Rust makes many things explicit that are implicit in other languages. You always have to deal with lifetimes one way or the other. Which is why I think it would be easier to learn, you get immediate feedback.
- imron 7y ago> Rust has a lot of things that C doesn't, like classes, lifetimes, and the borrow checker, which can be jarring to deal with for programmers used to other languages. If you are a competent C programmer - the kind that "doesn't make" memory errors, you have to be manually keeping track of lifetimes and borrows. Rust takes that mental effort and offloads it to the compiler. Lifetimes and the borrow checker will likely be jarring for people coming from languages where you don't need to worry about memory allocation and ownership, but if you are coming from C or C++, you will likely find the borrow checker a relief (I did). > the compiler won't let you do the "bad" things, so you have to get everything write from the word go. And it's wonderful! Finding and fixing problems at compile time is the fastest and cheapest way to do it, and is also a productive way to refine your abilities.
- rs23296008n1 7y agoRust syntax is strange but understandable to my C/C++/nim/python/elixir experience. I successfully managed to port a few test projects to it several months ago. Didn't mind the experience at all except for a few niggles which actually are nothing to do with the language itself and more just some of the community attitudes. Some of the evangelists are... less optimal.