Hacker News new | ask | show | jobs
by chimeracoder 4495 days ago
He's right. With every project, there's a tradeoff between achieving the goals of the project and maintaining compatibility with existing systems.

As a Go programmer, I feel a bit sad/ashamed to be saying this, but look at Plan 9 - it failed to usurp Unix (and its descendants) as the dominant OS, because the latter was "good enough", and was already more widely supported and used.

Plan 9 vs. Unix is a very different comparison than Vim vs. Neovim, and there are a lot of other factors at play, but the same principle actually holds. Improving or extending an existing system in a compatible way is a lot easier than trying to establish mindshare with a completely new tool.

The tradeoff is that extending existing systems leads to cruft and bloat. So if you can establish mindshare with a new tool, you have an opportunity to make a much more elegant one. But that's a big "if".

EDIT: I think a better analogy may be an attempt to refactor the Linux kernel into a microkernel. I'd certainly love it if this magically happened - microkernels are much easier to work with, and much more elegant. But it'd be hard to make the case that that'd be a worthwhile endeavor at this point, given the costs of doing so.

2 comments

I think the other factors in play are the dominant ones in the Unix/Plan9 issue, though. The original "upstream" of Unix was Research Unix, the stuff the Bell Labs researchers were working on. V1 came out in 1971. But V7, released in 1979, basically got forked into a bunch of commercial Unixes (and indirectly, some free ones via the BSDs). Research Unix V8, V9, and V10 got virtually no uptake, despite being incremental evolutions of the original upstream, due to a mixture of inertia and licensing restrictions from AT&T. Instead, different incremental evolutions of V7, developed by other developers outside Bell Labs, became the dominant strains of Unix.

Plan9 was a pretty significant departure from Research Unix V7, but not as significant a change compared to V10... which didn't matter because nobody outside Bell Labs was using V8/9/10 anyway, since everyone was working on various forks of V7 (BSD, SunOS/Solaris, Xenix, etc.).

I agree Plan 9 is not a good example in this story. Plan 9 didn't failed because of the problems associated with a re-write as described in Joel's post, but because of political and social issues.

> Research Unix V8, V9, and V10 got virtually no uptake, despite being incremental evolutions of the original upstream, due to a mixture of inertia and licensing restrictions from AT&T.

I'm not sure what you mean by inertia. v8-v10 were not widely released to avoid another BSD incident.

v8-v10 were 4.3BSD derivatives, so I'm not sure I'd call them incremental evolutions on the original upstream. They removed and/or reworked all the new BSD stuff though, and the basic userland was very custom. Some of it survives (in some form) in Plan 9.

But isn't Go itself an example of success with a complete rewrite?
Good point.

If you view Go as a "rewrite" of C, then perhaps, but I wouldn't. It's a new language altogether. C can be embedded in Go easily, and even if it couldn't, there's no reason that one has to "win out" over the other. There's less direct competition between two languages than there is with a family of OSes. And Go was never intended to replace C completely - it just provides a better alternative for some subset of what C/C++/Java are used for. On the other hand, any given system is going to run only one OS[0].

In any case, as I mentioned, it's a tradeoff. There's no absolute answer, though I think he's right here in that the benefits don't outweigh the costs for this example.

Put another way, much as I might like to run a microkernel, I'd have a hard time concluding that it'd be the right move for the Linux project to spend time refactoring the entire codebase into a microkernel!

On the other hand, to see an example of a rewrite that was successful, look at Reddit, which rewrote the entire codebase in its early days. GCC could also be considered an example, depending on how you look at it.

[0] You can run more than one via virtualization, sure, but a number the benefits of Plan 9 come from having an entire set of computers running the same OS.

Go is certainly not a rewrite of C. It looks like most/all of the go compiler have been/are being rewritten from C to Go, described at https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdw... . That looks to be machine-assisted, so I'm not sure how good an example it makes.
This "Go is a rewrite of C" misinformation that's been floating around lately is getting almost as bad as the "JavaScript is Scheme-like" nonsense that has gotten uncomfortably common.

Although incorrect and annoying, they are at least becoming a way to identify people who likely don't know what they're talking about.

Odd. This is the first time I've seen it, the one about Go that is.