logoalt Hacker News

flohofwoe • today at 9:32 AM • 3 replies • view on HN

I don't agree. UNIX was an extremely niche operating system until Linux won the data center, at that time both C and C++ were already extremely popular outside the UNIX world. C won because it was so easy to adapt to new hardware architectures (even GPU shading languages are just minimally extended flavours of C and C++).


Replies

pjmlp • today at 10:19 AM

Most people only cared about C, because they needed to work on UNIX, and UNIX was taking over the server room and all 1980's graphical workstations.

C was pretty much ignored on 8 bit home computers, outside some toy compilers for CP/M.

In the 16 bit days, it was yet another language alongside BASIC compilers, Pascal, Modula-2, Assembly.

C is so tied to UNIX, that POSIX had to be created so that any non-UNIX operating system could provide a cozy home for their C compilers.

UNIX/POSIX is for all practical purposes the runtime most C applications rely on, there are naturally some exceptions like free-standing or Windows (which eventually gave up and add to start improving its support).

It is only due to historical accident that Microsoft gave up on Xenix, instead of replacing their MS-DOS efforts.

imtringued • today at 10:54 AM

Disclaimer: This is just some cursory research using LLMs.

C was invented to rewrite UNIX in a programming language that made it easy to port UNIX between machines.

So what you're saying is contradictory. You're saying the underlying motivation of C was wrong or unnecessary (porting UNIX to different hardware architectures) but C won because that underlying motivation (easy porting between hardware architectures) was partially right.

Your position is now that C didn't need UNIX as a stopgap, which is weird because your argument gains no weight (basically saying C's dominance is sheer coincidence) if it's true but if it's false you're just plain wrong.

➕ show 1 reply
prerok • today at 9:56 AM

Sorry, what? Most of data centers were running a UNIX operating system back in the day. What operating system do you think they were running?

➕ show 2 replies