News for hackers. Stuff that matters.
Re:The long goodbye to C by ravingraven on Friday November 10, 2017 @11:34AM (#15671000)
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.

Re:The long goodbye to C by pjmlp on Friday November 10, 2017 @11:49AM (#15671096)
To 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.

Re:The long goodbye to C by greenhouse_gas on Friday November 10, 2017 @12:45PM (#15671539)
Kill 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.

Re:The long goodbye to C by pjmlp on Friday November 10, 2017 @12:55PM (#15671617)
And so C use grew instead of dying, as Apple and Microsoft systems were already focusing on C++.
Re:The long goodbye to C by loeg on Friday November 10, 2017 @12:26PM (#15671388)
We 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.
Re:The long goodbye to C by pjmlp on Friday November 10, 2017 @01:07PM (#15671707)
If those UNIX likes have to be compatible with POSIX, they will have to support unsafe APIs, e.g. memcpy.
Re:The long goodbye to C by loeg on Friday November 10, 2017 @03:34PM (#15672745)
memcpy 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.

Re:The long goodbye to C by emodendroket on Friday November 10, 2017 @04:23PM (#15673173)
What's the point of POSIX if most of the applications won't compile on it?
Re:The long goodbye to C by loeg on Friday November 10, 2017 @05:08PM (#15673466)
I 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.

Re:The long goodbye to C by emodendroket on Friday November 10, 2017 @05:08PM (#15673475)
If we're starting from scratch something like Powershell would be way nicer
Re:The long goodbye to C by loeg on Friday November 10, 2017 @05:15PM (#15673520)
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.

Re:The long goodbye to C by emodendroket on Friday November 10, 2017 @05:21PM (#15673566)
It's always going to be a second class citizen on Unix, so there is little advantage to picking it up (it's available on Linux already). But in fact, for one thing, Powershell makes a lot of concessions to people with experience in both bash and CMD (for instance, ls, wget, and dir are all built-in aliases, you could probably go a while without realizing pipes work differently, etc), and, for another, by the time you're worried about this kind of thing I can't see why you're trying to make a clean break at all.

Once you've learned how it works having an object oriented shell is game changing. Powershell isn't necessarily the ideal implementation but I'm just calling attention to it as an existing, popular example of something better

Re:The long goodbye to C by pjmlp on Friday November 10, 2017 @04:38PM (#15673269)
Then it wouldn't be POSIX.1-2008 any more.
Re:The long goodbye to C by loeg on Friday November 10, 2017 @05:10PM (#15673481)
Your proposal, "kill Unix," wouldn't be POSIX.1-2008 either. I'm not seeing how that is a criticism of my counter-proposal.
Re:The long goodbye to C by pjmlp on Friday November 10, 2017 @05:36PM (#15673652)
Because as things are, no one would migrate to it if this compatibility isn't there, case in point Plan9 and Inferno.
Re:The long goodbye to C by katastic on Friday November 10, 2017 @12:25PM (#15671379)
And 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 ..."