5 ms·
This showing up next to "LibHTTP: Open Source HTTP Library in C" on the HN front page made me giggle. Someone should start a website a-la bitcoinobituaries for
by ravingraven 9y ago
This showing up next to "LibHTTP: Open Source HTTP Library in C" on the HN front page made me giggle. Someone should start a website a-la bitcoinobituaries for C.
C will be around for as long as everything under the sun has a C compiler. If you ask yourself when was the last time you started a C project, ask yourself when was the last time you wanted to write something truly (truly, including embedded) portable instead and there is your answer.
- pjmlp 9y agoTo kill C, we need to kill UNIX. So until we get to replace POSIX across the board, C will be around. It will take generations.
- katastic 9y agoAnd replacing POSIX will go just like that xkcd: "There are 8 standards and they all suck. We should make ONE good one to replace them all." ... "There are 9 standards and they all suck. We ..."
- loeg 9y agoWe can make unix-alikes in non-C languages, so what's the point of "killing" Unix? I don't see why that's a good goal to have or how it furthers the goal of replacing C.
- pjmlp 9y agoIf those UNIX likes have to be compatible with POSIX, they will have to support unsafe APIs, e.g. memcpy.
- loeg 9y agomemcpy is a libc API, as in, for the C language runtime. If your unix-alike does not use C, I don't see why it would need a C runtime. POSIX is clearly a standard for C unixes, but you could imagine a restricted subset of POSIX that didn't govern libc being applicable to a non-C Unix.
- emodendroket 9y agoWhat's the point of POSIX if most of the applications won't compile on it?
- loeg 9y agoI mean, I proposed a unix-alike written in a safe language as an alternative to OP's proposal, which was to "kill Unix." What would OP replace Unix with? Windows and Mac OS aren't suitable; they're written in C/C++ too. So any solution here must be a green field, from-scratch OS in a "safe" language. Any operating system written in a non-C language with no C support is going to break all existing C applications. This is inherent to OP's desire to remove all C. For the record: I'm opposed to removing all C. So why not preserve unix-like shells, filesystems, devices, commands, etc? None of those are tied to language of implementation. Potentially existing unix shell scripts could run safely on a purely non-C system. Sysadmins would carry over some familiarity from existing Unix-alike systems. That has some value.
- emodendroket 9y agoIf we're starting from scratch something like Powershell would be way nicer
- loeg 9y agohttps://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Public_servers_on_the_Internet https://en.wikipedia.org/wiki/Usage_share_of_operating_syste... Unix servers make up 68-98% of the internet, depending on who is measuring. There's a huge body of sysadmins familiar with shell who are not familiar with Powershell. So that's exactly my point: I don't think we should start from scratch on things like the Unix shell, filesystem hierarchy, devices, etc. People know them. Throwing out systems people already understand for no reason is a huge anti-pattern. If you think Powershell is superior, port it to Unix and convince Unix sysadmins to use it. I don't think it's going to be very popular.
- greenhouse_gas 9y agoKill Unix? Bell Labs tried to kill their child and supplant it with plan-9 and inferno. It failed. Not because they were bad OSs, but because once you have market domination and code, things _must_ be backwards compatible. If Linux/GNU didn't imitate POSIX, it wouldn't be any more popular than Haiku.
- pjmlp 9y agoAnd so C use grew instead of dying, as Apple and Microsoft systems were already focusing on C++.