4 ms·
The situation described in the video can and probably does happen to C++ codebases as well, if not even more than Rust. It's easier to be good at Rust than it i
by linusg789 3y ago
The situation described in the video can and probably does happen to C++ codebases as well, if not even more than Rust. It's easier to be good at Rust than it is to be at C++, even if C++ seems easier at first.
- mikece 3y agoFrom the video it sounds like the largest problem is that the company/manager prescribed Rust as the solution to a problem where Rust might not have been the best fit. The dude wrote a Java version on his own time and despite being on a Java team at that job management insisted it be done in Rust. There might be issues with Rust and the scenario in question but it sounds like conditions at that work place are a bigger problem than the choice of a language.
- pclmulqdq 3y agoThe specific situation the poster is in is very Rusty. If you are used to doing things a certain way that the borrow checker doesn't like (no, that doesn't automatically mean that what you want to do is unsafe or incorrect) then you will have big problems writing Rust. In this case, Rust was forced on the original author by management and there was a pre-existing codebase that did things in a very non-Rusty way. On top of that, it appears to be a performance-sensitive application with the need for async. That's just a recipe for a uniquely Rusty form of pain. This kind of gripe seems valid about the language. Rust is fantastic if you can be very Rusty, but it's also a language with a lot of opinions about how you ought to write code.
- fnordpiglet 3y agoWriting language code idiomatically is a bit of the deal with any language. Trying to break a languages fu to be more like a language you’re more familiar with is common when learning a new language, but blaming the language is a rookie mistake.
- Brian_K_White 3y agoWhat kind of mistake is thinking all legitimate tasks are equally doable in all legitimate languages? Or that there is any language that has no warts at all, and so any problems are automatically "holding it wrong"?
- pclmulqdq 3y agoI think people say this about languages that are very opinionated (like Rust and Go) not realizing that many other languages are a lot more forgiving of a non-idiomatic style. There are lots of good reasons to use a non-idiomatic style, one of which is mentioned here: there is an existing codebase that doesn't fit the language's idioms. Compared to Rust, C++ and Java will let you compile and run code in a lot of different styles, and it will work (albeit without the guardrails). Being permissive on this front is a language design choice, and while it is in vogue to make your language extremely opinionated to the point where you can't write non-idiomatic code that compiles, it does limit your language's applicable scope. This is such a problem that Google is currently working on their private "Carbon" language instead of switching to Rust (outside of a few areas). The OP isn't learning Rust the way you or I learned Rust. He is learning it in the context of someone who (1) doesn't want to, and (2) is doing it within a huge legacy codebase. That is a fundamentally different experience than someone who is excited about it and gets to start with a blank slate.
- fnordpiglet 3y agoMost languages have an idiomatic way of writing them, Java certainly does, Python, ruby, etc. C++ doesn’t simply because it’s a giant mess of hodge podge. Simply being able to compile something doesn’t mean you’re using the language idiomatically, and when you innovate your style off the idiomatic path sooner or later you’ll end up in a world of hurt with everyone you turn to for help telling you you did it wrong. You’ll have trouble finding collaborators, retaining talent, etc. Eventually you’ll rewrite as an idiomatic version. The fact languages have gotten tighter over time with their idiomatic style being verified up front is, IMO, a feature not a flaw. over the 40 or so years I’ve been programming I’ve come to appreciate more and more being able to learn the idiomatic way toll free when learning the language. I think rusts limitations are more to do with immaturity than opinionation - for instance lack of async closures, async traits, compile time reflection, generators, etc, are all point in time flaws that with time will make the language much easier to make expressive and flexible implantations. Yeah I get they’re not interested in learning Rust - but again that’s not rusts fault or a flaw, or in any way supportive of less opinionated languages. It’s a rookie mistake. When you’ve only learned one or two languages learning a new one is a chore and disheartening and it’s always someone else’s fault you feel like a loser. As you mature as an engineer first it gets easier and more rewarding to learn new ways of doing things, but you also realize that feeling of being a loser is just the brain resisting and the feeling of learning.