←back to thread

348 points giuliomagnifico | 1 comments | | HN request time: 0s | source
Show context
jjgreen ◴[] No.46243706[source]
Complete rewrites are always a bad idea ... [mutters of agreement] ... except in Rust! [cheering]
replies(7): >>46243792 #>>46243912 #>>46243944 #>>46243994 #>>46244254 #>>46244291 #>>46244748 #
lynndotpy ◴[] No.46243912[source]
Complete rewrites have been done before. They're not impossible tasks. C to C++ (like with fish), C++ to Rust (fish again, Tor, etc), Java to C# (something I've seen), C# to C++ (evernote), Blender Game Engine to Godot (many small cases), Godot to Lumberyard (something I've seen), Unity to Godot (many small cases), etc. And there are all the myriad rewrites within the same language, or across major breaking changes (like Python 2 to Python 3).

I think "you should never do a full rewrite" is something of a reactionary response to the juvenile idea new devs and interns get every now and then. But sometimes, a rewrite really is a good idea.

But in this case, per the announcement ( https://blog.torproject.org/announcing-arti/ ), the reasons are pretty convincing. The major reasons are, unsurprisingly, all around memory safety.

replies(2): >>46244237 #>>46244637 #
FieryMechanic ◴[] No.46244237[source]
The issue is that every other week there is a rewrite of something in Rust. I just do an eyeroll whenever I see that yet another thing is being rewritten in Rust.

I've tried compiling large projects in Rust in a VM (8GB) and I've run out of memory whereas I am sure a C/C++ large project of a similar size wouldn't run out of memory. A lot of this tooling I had to compile myself because it wasn't available for my Linux distro (Debian 12 at the time).

A lot of the tooling reminds me of NPM, and after spending a huge amount of my time fighting with NPM, I actually prefer the way C/C++/CMake handles stuff.

I also don't like the language. I do personal stuff in C++ and I found Rust really irritating when learning the language (the return rules are weird) and just gave up with it.

replies(5): >>46244510 #>>46244754 #>>46244766 #>>46244816 #>>46246983 #
g947o ◴[] No.46244754[source]
Sure. That doesn't matter. Of course you can keep writing your C/C++ or using CMake, nobody is going to stop that. But other people's project are not going to stop adopt new tech stack because how you feel about it.
replies(1): >>46249232 #
1. FieryMechanic ◴[] No.46249232[source]
> That doesn't matter. Of course you can keep writing your C/C++ or using CMake, nobody is going to stop that.

What it is going to cause is having to learn a bunch of new tooling which I have to somehow to get behaving on my Debian box, because a particular tool that I will need to compile from source will have a bunch of Rust dependencies.

I've already run into this BTW, where I wanted to compile something in Rust and it needed a third party task runner called "just". So I then needed to work out how to install/compile "just" to follow the build instructions.

Why they needed yet another task runner, when I am pretty sure make would have been fine, is beyond me.

> But other people's project are not going to stop adopt new tech stack because how you feel about it.

I don't expect them to. That doesn't mean I can't comment on the matter.