Live data from Hacker News

Why Not Rewrite It in Rust? (2016)

transitiontech.ca

11–20 of 79 posts

Re: Why Not Rewrite It in Rust? (2016)

#11
post #5

As a D user, I am looking at Rust with curiosity, but haven't yet seen any reasons that would make me switch.

I think Rust is such a well designed language. But as someone coming from more high-level languages I sometimes feel a bit lost due to not getting as much help from the IDE as I'm used to for C# in Visual Studio and Java in IntelliJ. For Rust I've only tried IntelliJ with the Rust plugin, which seems like the best choice for what I'm after.

Rust may hopefully get better autocompletions if they work on their Language Server implementation. C# compiler was explicitly rewritten so that it is IDE friendly and I fully agree with this decision. That said even good, old Java has excellent tooling support that I do miss from all these hip languages (such as Rust).

Re: Why Not Rewrite It in Rust? (2016)

#12
post #11
post #5

Earlier quoted context omitted.

I think Rust is such a well designed language. But as someone coming from more high-level languages I sometimes feel a bit lost due to not getting as much help from the IDE as I'm used to for C# in Visual Studio and Java in IntelliJ. For Rust I've only tried IntelliJ with the Rust plugin, which seems like the best choice for what I'm after.

Rust may hopefully get better autocompletions if they work on their Language Server implementation. C# compiler was explicitly rewritten so that it is IDE friendly and I fully agree with this decision. That said even good, old Java has excellent tooling support that I do miss from all these hip languages (such as Rust).

The compiler team is planning on following in C#’s footsteps with the rust-analyzer project.

Re: Why Not Rewrite It in Rust? (2016)

#13
There will always be inexperienced people who just learned about "cool language X" and go on a crusade everywhere they go about why Y is not written in X with obvious disregard on how difficult (and often useless?) rewriting a whole project is.

I remember seeing a post on a Qt mailing list asking if there were plan to rewrite Qt in Erlang.

At least it usually come from a good place and they tend to be polite about it. Better than a lot of open-source freeloader getting angry because B is still not implemented in A ...

Re: Why Not Rewrite It in Rust? (2016)

#16
a reminder that "rewrite it in rust" is not usually a ground up rewrite, it's an effort to translate the c into a safer language as you go, it doesn't just burn it down, salt the earth and start over. Have a look at remacs [1] to see how this works in practice.

1: https://github.com/remacs/remacs

Re: Why Not Rewrite It in Rust? (2016)

#18
"rewrite in X" request is a comon sign of immaturity. I'm guilty of it but eventually I learned that A) rewrites are rarely worth it B) it's disrespectful to ask others to scrap their code and rewrite it in my favorite language

Re: Why Not Rewrite It in Rust? (2016)

#19
post #4

Writing a few lines of "why not rewriting it in XXX" is more a sign of inexperience or immaturity in my humble opinion. Maybe it is a good idea, but if you are going to propose to a dev team a massive rewrite that will take months or years, you should at least have the decency to analyze the code base, do a small POC, profile some part and point out where the improvement could happen. (And if you've discovered someth…

Programmers, especially naive ones, tend to think asymptotically. We focus on what would be the most theoretically ideal and write off pithy concerns like "time" and "effort" as implementation details. I'm guilty of this myself.

Rust is this unusual situation where a new language is in many ways a strict improvement over a very widely-used preexisting language. That is extremely rare. So I think that's where the religious fervor comes from.

Would the world be a better place if Tor and the Linux Kernel and every C++ project out there had originally been written in Rust (setting aside the fact that this was obviously impossible)? Sure, maybe. But those projects also benefit from decades of refinement and bug fixes. Rewriting them means losing all of that. As an idealistic programmer it's tempting to write factors like legacy refinement off into the margins, but they're actually very significant. A piece of software's value doesn't solely reside in its preconceived design.

Re: Why Not Rewrite It in Rust? (2016)

#20

I know RIIR appears to offend a lot of C/C++ devs, and I understand why. I do however, think RIISSL (Rewrite It In Some Safe Language) is a real meaningful thing. The reason Rust is the figure head for this is because I've not seen other languages with any amount of popularity take "safety" to the degree Rust has. I imagine there are others, I recently saw bounded array types in Ada and thought it was cool, but Rust…

> I know RIIR appears to offend a lot of C/C++ devs, and I understand why. I do however, think RIISSL (Rewrite It In Some Safe Language) is a real meaningful thing.

It is not meaningful for open source projects where RIIR or even RIISSL types jump in and start offering unsolicited advice to contributors. These folks can fork and/or make some POC etc if they seriously believe it is a net win.

Post reply on HN