The conversation

Lessons learnedExperience excerpt · English

I wrote some small games in Zig, I made some money writing Go

… I wrote some small games in Zig, I made some money writing Go. I dabbled in Elixir, Erlang, some Lisps, it goes on. I love programming. After my 9-5 C# Job nowadays I usually spend a few hours programming with my friends. I was extremely skeptical of Rust, due to the hype and some very obnoxious Rust proponents. I learned Rust, I'm still learning it, but I've shipped a few smaller backend apps and worked on a few larger projects now. The main reason why I think that Rust should replace C++ in all new projects is actually very simple: Tagged unions, pattern matching, reflection, no OOP and the toolchain. There is a lot of syntax in Rust that is beautiful, but besides that, those are the most useful features. They save hundreds to thousands of lines of code per codebase, compared to C++. The Option<T> alone is a simple enum Option<T> { Some(T), None, } Whereas in C++, std::optional<T> is a massive class with edge cases, weird implicit conversions ({} = std::nullopt, beware), and don't even start with differences between different STL implementations. What about `std::make_optional`? …

Original discussionFreeBSD considers Rust in the base system140 source comments · at import
2

Community replies 0

No community replies yet. Add your perspective.

Replies from the source 2

Direct replies available in this import. Original-language excerpts.

LI

To add: The only people I know who think C++ is easy to write "good" code for, and who think that you can "just" be careful and skilled, have NEVER written multithreaded server code in C++. Hit a multithreaded C++ server with 20k users a day alone and you would not believe the edge cases and weird states they will generate for you.

Full original
PD

I am glad that you have changed your mind. Not because I am a Rust advocate (haven't worked with the language in at least a year now, what advocate would that make me?) but because this: > I was extremely skeptical of Rust, due to the hype and some very obnoxious Rust proponents. ...is obviously a very biased way of gauging anything. As mentioned upthread in another comment of mine, every single community has the minority of loud bad apples and it's not fair to judge Rust because its community is literally like any other on this planet. You did the right thing, you ignored the emotional responses and went to check for yourself, factually and objectively. I'd be honored to call you my colleague. Bravo.

Full original
Continue on Hacker News

Respect different perspectives. Share concrete experiences.

Sign in to post, reply, repost, and quote.