News for hackers. Stuff that matters.
Re:Microsoft seeks Rust developers to rewrite core C# code by wredue on Saturday February 03, 2024 @01:03PM (#39242979)
Honestly. Rust is not all that “difficult”. There’s just SO MUCH that you MUST know to be effective.

You need to know all of the rustisms. Plus you need to have a general knowledge of memory. You need to understand how memory is being abstracted and how to work within those constraints so as not to be slow. You need to know all of the monads, what they mean, why each exists, what the nuance is, and why you might use one over another in a specific situation.

It’s not difficult so much as it just takes so much time and challenging-yourself practice to try to memorize everything.

A “being effective at rust” book would probably dwarf a “being effective at C++” book in pages assuming similar prose. And we all know how much of a beast C++ is.

Re:Microsoft seeks Rust developers to rewrite core C# code by spoiler on Saturday February 03, 2024 @01:17PM (#39243114)
> A “being effective at rust” book would probably dwarf a “being effective at C++” book in pages assuming similar prose. And we all know how much of a beast C++ is.

I've written C++ for close to a decade before switching to Rust, and this is categorically untrue.

> Plus you need to have a general knowledge of memory. You need to understand how memory is being abstracted and how to work within those constraints so as not to be slow.

If anything, this is more true so of C++.

> You need to know all of the monads, what they mean, why each exists, what the nuance is, and why you might use one over another in a specific situation

You can use a lot of stuff before needing to know their full history. You don't need to know the history behind 0, null, pointer, numbers and addresses before, how hardware works, etc to use Option, for example. You also don't need to know the (inconsistent and arcane) history of errno and magic numbers to use Result. Etc, etc.

This vastly over-exaggerates Rust's complexity.

Yes, it borrows concepts from functional programming, but a lot of these concepts are simpler than stuff you deal with in imperative programming.

I think the issues here is that people don't tend to like to change their way of thinking, even if it's for the better. Also, Rust has ample in common with imperative/traditional language, so it's not a huge leap into some alien mental model, as you make it sound.

Further, C++ makes you think way more than Rust; in Rust the compiler does a lot of the thinking for you. Not to mention, the type system is easiest to reason about than C++'s old (and mentally inefficient) template system.

Re:Microsoft seeks Rust developers to rewrite core C# code by withoutboats3 on Saturday February 03, 2024 @01:20PM (#39243144)
"Dwarf"? "Dwarf"?! I may be biased (because I am very effective at Rust and terrible at C++) but I can't believe this seems probable. std::optional, move semantics, boost, template templates, SFINAE(!!) C++ has all the expressivity of Rust and more, with far less regulation to assist the programmer in using it effectively.
Re:Microsoft seeks Rust developers to rewrite core C# code by PH95VuimJjqBqy on Saturday February 03, 2024 @02:05PM (#39243589)
you don't have to know _any_ of what you just listed in order to be effective with C++.

the closest thing to required would be move semantics.

Re:Microsoft seeks Rust developers to rewrite core C# code by tracker1 on Sunday February 04, 2024 @01:05AM (#39248010)
Depends on what you're trying to do. The same can be said of Rust. You can write massive web services serializing days from RDBMS databases quite a bit easier in Rust than with C++ as an example.
Re:Microsoft seeks Rust developers to rewrite core C# code by PH95VuimJjqBqy on Sunday February 04, 2024 @05:57PM (#39255393)
> Depends on what you're trying to do.

No it doesn't.

people were effective with C++ before std::optional existed, before compiler assisted move semantics existed, and SFINAE is not something anyone has ever needed to understand in order to use something like the STL or any other template based library, such as Boost.

You don't know what you're talking about, this isn't up for debate.

Re:Microsoft seeks Rust developers to rewrite core C# code by thfuran on Saturday February 03, 2024 @05:18PM (#39245335)
>It’s not difficult so much as it just takes so much time and challenging-yourself

What's the difference?