Hacker News new | ask | show | jobs
by e-dt 1548 days ago
Modern computing seems to be a story of "worse is better", and not just the classical "worse is better" of Gabriel's paper but something that amounts to "worse is better squared". Gabriel bemoaned the adoption of Unix and C over more "well-thought-out" designs, but Unix and C were at least designed. ("Say what you will, at least it's an ethos.") The same could go for TCP/IP's lean design as opposed to the heavyweight OSI model. But it seems like even these designs are too onerous for the modern day, and instead we build what would normally go on top of Unix or TCP/IP on the Web. All platforms are now the Web platform, which was never designed to run programs and hence is a non-cohesive mess. All networking is now client-server, or indeed is now just HTTP requests: goodbye end-to-end principle (hello NAT!), goodbye protocols other than TCP or UDP. We can build the same things on this platform as we did with native platforms, but we have to do it using kludgy methods which sacrifice a lot of performance and only work 95% of the time: so instead of TCP, we get WebRTC, and instead of assembly we have WebAssembly. And what do we gain? We gain security, and we gain ease of installation (just go to www.zombo.com vs go to zombo.com, click on "Downloads", click on "Windows x64", wait 4 minutes for it to download... and so on).

Can we do better? I think we can: if operating systems caught on to capability-based security, then the Web platform could become a legacy platform. (We see that phone OSes, which use capability based security, still direct us to "the app" rather than "the site".) And adoption of IPv6 could void all the kludgy workaround of NAT that we've had to develop.

But we live in the world we inherit, rather than the one we imagine, so currently all we can do is traverse NATs and write webapps.

3 comments

Its stuff like what you outlined that drove me into product management. Technically better almost never easily translates to market success. you think TCP/UDP is bad? we are stuck with light water reactors because they were the first commercially viable plant design. Had a lead cooled reactor been viable before that we could have a much different nuclear power landscape. People could implement a new technology, but getting people to use it is the realm of sales, marketing, and the dark side of tech.
Wait til we look back at Li-ion batteries. We're blowing our wad on a technology that will likely never meet the need, which makes innovative technologies that actually do meet the need much less likely to be successful.

Worse is better.

C was not well-designed. In fact I would say it was poorly-designed It is weakly typed with a fair bit of undefined behavior. Many people praise Dennis Ritchie for creating C, but I don't. Ken Thompson did a great job on designing Unix and UTF-8 though. To me, Ken is the real hero of these two.
C was designed to the constraints of the time and place of its creation, and was a thoroughgoing success within those bounds.

It is our fault that we use it beyond.

C came out in 1972, but we had Pascal in 1970 which is strongly typed and doesn't have undefined behavior. Pascal wasn't perfect and did have a few issues with use in writing operating systems but Modula-2 and it's descendants were really good. The early versions of the Macintosh System were written in Pascal and used assembly to handle the low level bits Pascal was missing. With Rust we're finally getting back to safe programming. I'm hoping to see other existing and new languages with more safety.
Apollo Aegis, a system that was inspired, like Unix, by Multics, and was better than Unices of the time, was coded in Apollo Pascal. You could identify the difference between Standard Pascal and an actually useful Pascal by looking at Apollo Pascal extensions.

Pascal had null pointers and manual allocation, so was not really any safer than, anyway, C90. Of course C pre-90 lacked even function prototype declarations.

I heard C called the JavaScript of the 1970s once in that it's a mediocre language that got really popular by tagging along with other platforms.
It certainly tagged along with Unix but with 16-bit systems like the IBM PC, Macintosh, Atari ST and Amiga, it began to take over. We had safe languages like Pascal and Modula-2 at that point but computers weren't networked back then and programmers cared more about saving a few CPU cycles than having more stable programs. Today we know how dangerous C is for online security. Sure, safe code can be written in C but it's a lot more work for the programmer than using a language that is designed to be safe. It's good to see Rust come along and I'm hopeful to see safety being added to existing and new languages.
> but Unix and C were at least designed.

And instead of C, we get Javascript.