7 ms·
I just can't bring myself to spend time learning Rust when all the demand is for C++, C, Java, Typescript, Python, etc. Feels like we're going to be stuck in th
by zeroCalories 2y ago
I just can't bring myself to spend time learning Rust when all the demand is for C++, C, Java, Typescript, Python, etc. Feels like we're going to be stuck in this limbo forever similar to languages like Kotlin.
- nfrmatk 2y agoIt seems to me that the point of the article is that "all the demand" is not just for C++, C, Java, Typescript, Python, etc. There is increasing demand from larger companies for Rust. No one is forcing you to learn Rust. You don't have to bring yourself spend time learning it. You can keep writing those other languages. Those languages have been around for a while and they'll continue to be around for a while more. Rust is just getting some time on that stage as well now.
- zeroCalories 2y agoThere's always demand, but at what cost? Mixing languages sucks. Rewriting stuff is not always an option. New projects could use Rust, but will you be able to get the head count? There are whole armies of skilled C++ devs, but only a small group of competent Rust devs. This is the exact same problem Kotlin ran in to.
- throwawaymaths 2y agoI think some dyed in the wool programmers are not afraid to learn something new but from experience see some nightmarish patterns in rust (e.g. c++ style templates for generics, phantom) and also watch less experienced programmers/architecture astronauts successfully argue to move things to rust without considering the future pain and are legitimately worried about being eventually forced to use it. Doesn't help that e.g. government is now saying "don't use memory unsafe languages".
- mav3ri3k 2y agoFair enough. I have personally experienced pain with phantoms. But then what would you advice to do ? There are nightmare patterns in rust and c++. Looks to me as pick your poison just that one is new and other has been around for fair bit.
- zeroCalories 2y agoLooking at Typescript, the latest successful language, I think the way forward is to make C and C++ safe by gradually adding and deprecating features.
- mav3ri3k 2y agoI am sorry. I really don't see your point. Typescript is in a completely different league of languages than rust/c/c++ with vastly different use cases. Also, the world still mostly speaks C99 when iterative improvements are constantly being made up to C23.
- zeroCalories 2y agoThe point is that Typescript was able to replace JavaScript by adding to it. Converting a codebase from js to ts was simple. Going from C++ to Rust is not. I think C23 is going in the right direction, but it needs to go further.
- drawfloat 2y agoTypescript isn’t a separate language though, nor does it replace Javascript, you’re comparing apples and oranges.
- OJFord 2y agoAlmost ten years ago I was really excited about rust, but the sort of thing you describe has really put me off. It's become 'C++ but with better guarantees', whereas I liked it for being 'python ergonomics with stricter correctness' or something. I really think there's room for a language more focussed on (sacrificing a bit for) usability/readability/DX - rust has great features like doc tests, in-module tests, structural pattern matching, macros, traits, .. but<some<of<the<container<crap, 'that>, ends<up, necessary>>>>> really ruins it for me. And on the one hand yes it is trivial, it is just syntax. But I do think it matters? (It's late, I'm tired, not a very well formed thought, but coincidentally I was daydreaming about designing a language earlier today, so here we are.)
- AYBABTME 2y agoFaster with Python ergonomics is Go. Safer with C++ perf is Rust. (my rule of thumb)
- oscillonoscope 2y agoIf you haven't checked it out, nim sits at a really good middle ground for ergonomics, safety, and speed.
- AYBABTME 2y agoI haven't looked at it in years, but that's what I've been hearing indeed.
- pjmlp 2y agoFor faster with Python ergonomics, Common Lisp, Scheme, Julia, OCaml, F#, C#, Scala, Kotlin, TypeScript, Clojure
- MBCook 2y agoI’d suggest looking at Swift. Non-Apple development keeps getting better. It’s a very easy to read language with lots of safety, strong types,good standard library, await, and tons of users (thanks to Apple). Integrates easily with C/C++/Obj-C/Obj-C++, or anything else that can do C interop. Just gained neat macros and tests. It’s probably my current “if I could pick anything” language. On top of all the rest, it looks more like JS/Python than the pile of symbols C++ or Rust or even Obj-C can turn into.
- xelamonster 2y agoI learned C++ first and Rust only within the past couple years, and I'd never willingly choose write a project in C++ again with the option to use Rust instead. Generics can get messy and the phantom data is indeed awkward, the difference to me is that in Rust if you go wrong the compiler most often can highlight the exact issue and suggest accurately how to fix it. My experience with C++ is that the compiler errors tend towards being so incomprehensible they sometimes felt intentionally misleading. The Rust compiler enforces correctness to a degree that gives me significantly more confidence in the programs I write; C++ is a major improvement on C here but still gives you so many ways to shoot yourself in the foot that would just not compile in a Rust project.
- lenkite 2y agoDid you write C++ after C++ 20 came out ? With concepts and a modern code base, the incomprehensible errors are a thing of the past.
- xelamonster 2y agoI haven't actually, glad to hear it! I still see big advantages to the extra compile time safety provided by Rust, and despite the mentioned similarities I find its syntax significantly clearer to read and write. C++ templates took me forever to really wrap my head around where a similar declaration in Rust feels immediately intuitive even where I don't fully understand all the nuances.
- EasyMark 2y agoDo you expect people to become expert rust programmers over night? I have 15 years of c++ under my belt and only recently got the chance to do some rust. Of course some of my rust code is going to look like c++ until I get some practice, some code review criticism, and personal study in. I’m here for the journey, and I am enjoying rust’s perks and mostly less mental overhead.
- proggyfawnt 2y ago[dead]
- pornel 2y agoRust superficially looks like C++ to avoid looking weird to existing C/C++ programmers, but semantically it's quite far from C++. Rust's generics are not like C++ templates: they're only type based, and don't use syntax-based matching, don't have tricks like SFINAE. ODR is guaranteed by construction. Trait lookup is simpler: there's no overloading, no inheritance, no implicit conversions, and interaction with namespaces is simple (ambiguity is an error). Phantom type looks alien if you haven't used it, but for what it does, it's actually a pretty simple. It's there to explain in Rust's terms what an opaque type or a foreign C/C++ type does. You just need to give Rust an example of an equivalent type, and you get a correct as-if behavior, and you don't need to even know that you've just configured type's variance and destruction order checking.
- throwawaymaths 2y agoRusts generics might wind up adopting constexpr like abilities and also on the docket are keyword generics.
- mav3ri3k 2y agoIt is great that the ecosystem is growing, but there is still time for things to trickle down. As college student I have invested time into rust because I see value in the language but there are absolutely zero entry level jobs or internships. To get my foot in, my only real options are C/C++.
- zabzonk 2y agoa few years ago there was a big thrust here for haskell. and now it has all but gone. i do get a feeling that the same will happen with rust - but we will see.
- cyanydeez 2y agoThose lanagues scream maintenance window.
- layer8 2y agoAre you referring to https://repairmanjack.com/books/the-lanague-federation-series/ https://repairmanjack.com/books/the-lanague-federation-serie...? ;)
- cyanydeez 2y agoNo? What xame to mind when someone talks about jobs in programming ans the list presented just refers to long lived langagues and existing code bases along side the need yo maintain them. Then theres the double entndre with rust and the potsntial yo reduce maintenance and how what really matters is some kund of metric like loc per dev hours for maintenance. So like, if two language are comparable and one requires 2 prgrammers to maintian and the other 2.5, the second one would potentially have more jobs based entirely on how maintainable it is. So claiming "these have more jobs" really is a fecestious statement
- throwawaymaths 2y agoRust screams a nightmare to maintain (coworkers endlessly bikeshedding over the type signatures, insanely long PRs for refactors needed prior to feature work)
- empath75 2y agoI've been writing rust code in production for 2 years and none of that happens, and this is with a team that was relatively new to rust.
- mav3ri3k 2y agoYou examples seems to be for a dynamic environment where things are changing. Rust is naturally at slight odds in such a scenario Instead of quick and dirty, it allows to embed the logic in the type system such that the compiler can help you. Getting off the ground is much harder but staying there is easier. .
- empath75 2y agoThere's tons of Rust jobs out there, and they tend to be on the high end of salary. Java devs are a dime a dozen.
- mianos 2y agoI just looked on Seek, the platform people mainly user here in Sydney, there is one job, outside panel beaters.
- Gigachad 2y agoIn Australia the Rust jobs are mostly crypto scam listings unfortunately.
- mianos 2y agoI notice, outside of Sydney there a few. There seem to be a bunch of Binance jobs. Are they the ones that are scams? They look kinda wacky, the Rust job says "Who may apply Current university students and recent graduates who can work at least 4 days per week." Maybe this is some way to avoid Australian salary regulation and pay $10 an hour?
- csomar 2y agoThere is very little jobs in Rust and as of recently almost nothing. A couple years ago it was mostly crypto but now only a few big companies are hiring for Rust.
- seanmcdirmid 2y agoIf you are specializing in the kind of lower level systems that are still built in C++, learning Rust will probably be useful since those systems are good targets for Rust. If you are in the Java, Typescript, Python world, then you can gnome it. Are their programmers that specialize in a weird combination like C++ and Typescript (Python makes some sense for systems code, as does Go)? I get learning and using both as a unspecialized student/junior, but I can’t see that lasting beyond mid-career.
- sdmike1 2y agoAs someone who specializes in the type of low level systems that are still built in C, C++ is considered high risk let alone rust. That is largely the reality of the industry. Some co-workers and I hope to introduce C++ as an experimental project next year. We also have some data processing code written in C++ that we would like to integrate as is. The reality on the ground is that C is often used over C++. ¯ \ _ ( ツ ) _ / ¯
- zeroCalories 2y agoDepending on your field, I can definitely understand the hesitation. It's fairly easy to imagine what kind of machine code will be generated from C, but much harder with C++/Rust.
- seanmcdirmid 2y agoIs there game for a Rust like native language over a close to assembly procedural language like C? It seems the only thing that makes predictions hard are things like fptrs and their structured v-table organization (which you can roll your own in C if you want, which almost any large project will).
- zeroCalories 2y agoI think fptrs and v-tables are fairly predictable once you know how they work. The main issue is that "good" C++ code makes heavy use of the STL, meaning that you need to know exactly how everything is implemented to understand what code will be generated. In embedded environments there can be strict timing requirements, memory restrictions, etc. That makes C++/Rust a little more scary. You might wanna ban stuff like std::vector because you never know when it will reallocate and double in size. Better to just use dumb arrays so everything is obvious.
- duped 2y agoIf you're familiar with systems programming in C++ then learning Rust is like having an automated code reviewer when you run `cargo check`. That said the biggest obstacle I've seen has come from C++ programmers traumatized by heavily templated codebases or dependencies equating Rust generics to templates. To which I say: C++ templates are a bastard product of preprocessors and macro systems more than proper generic programming. The errors you get from Rust generics are much higher up the chain than template errors and while both impact compile times, with Rust it's less pronounced.
- alecco 2y agoI remember a long time ago when the Java crowd had a similar attitude towards C++ and C. Fascinating.