Why Rewriting Emacs Is Hard

62 signa11 6 9/4/2025, 1:32:05 AM kyo.iroiro.party ↗

Comments (6)

celeritascelery · 1d ago
This was a great post that really gets into a lot of the details. As the author of one of the Emacs "clones" I wrote a detailed comment about some of this over on Reddit that might be of interest to readers here.

https://www.reddit.com/r/emacs/comments/1n7i586/comment/ncbc...

WantonQuantum · 1d ago
That's quite a read! Looks like emacs has done an amazing job of handling text correctly in the face of quite a few challenges. Including cases where there perhaps is no "correct" choice.

Now, I'm certainly not in the "all C code must be rewritten in Rust because security" camp but it does raise the question: With all this complexity how do I know that pasting text from a web page into emacs (or any editor really) isn't going to trigger an undiscovered vulnerability?

Edit: I guess that's rhetorical question because of course the answer is "you don't".

dlachausse · 1d ago
C style null terminated strings were a mistake. They are almost never the right answer. Even C itself should start transitioning to length prefixed strings instead.
Suzuran · 1d ago
It's worse than that; Null-terminated strings both predate C and were considered harmful when C was created.
Suzuran · 1d ago
The answer isn't material; You just rewrite it in Rust, and then if anything goes wrong it's not your fault because you did The Right Thing. Rust cannot fail, it can only be failed.
mdaniel · 22h ago
> Because of IRC's scandanavian origin, the characters {}| are considered to be the lower case equivalents of the characters []\, respectively

/me facepalms

Text rendering hates you (2019) - https://news.ycombinator.com/item?id=36478892 - June, 2023 (119 comments)

et al, as there was a follow-up posted in the top comment of that thread

I thought there was an "Falsehoods Programmers Believe About Text" but between that link and <https://github.com/kdeldycke/awesome-falsehood#international...> it's close enough for the point