Live data from Hacker News

50 years of C, the good, the bad and the ugly [video]

streaming.media.ccc.de

21–30 of 257 posts

Re: 50 years of C, the good, the bad and the ugly [video]

#21
post #13

Earlier quoted context omitted.

> Linux kernel is written in C Not exclusively in C, not anymore: https://docs.kernel.org/rust/index.html It might take another decade for a C-free build to be possible, though.

Wow that sounds fantastically optimistic, or pessimistic depending on your point of view I guess. Rewriting that amount of code in ten years sounds very very hard, at least.

I don't see such a feat taking place in the next decade, you need highly dedicated people. I can see new code being written in Rust but a C free build sounds like something that really won't be happening anytime soon.

I wish something like it could happen, but I am causyiously optimistic.

Re: 50 years of C, the good, the bad and the ugly [video]

#22
post #13

Earlier quoted context omitted.

> Linux kernel is written in C Not exclusively in C, not anymore: https://docs.kernel.org/rust/index.html It might take another decade for a C-free build to be possible, though.

Wow that sounds fantastically optimistic, or pessimistic depending on your point of view I guess. Rewriting that amount of code in ten years sounds very very hard, at least.

A significant amount of the lines of code in the kernel are for drivers (7 of 12 million lines?).

A potential strategy would be to set a date where any new drivers must be written in Rust. Deprecate every non-Rust driver on a date after that. Focus on rewriting only the drivers necessary for current hardware platforms (and some sensible/arbitrary cut-off going back x years). Then set a final deadline for a New Linux kernel release that removes all deprecated/C drivers.

I would blindly estimate that entire process to take 10-20 years (not including the time needed for debating the whole thing).

Then somebody "just" needs to rewrite the rest of the code.

So, uh, any volunteers?

Re: 50 years of C, the good, the bad and the ugly [video]

#23
post #2

His final conclusion is that C has to go, just like COBOL, Fortran, and PL/I. I wonder how long it will take before C will be gone totally when you realize how much COBOL and Fortran are still around. Not so long ago, I came along a module for Python 'SciPy.interpolate' that happens to be programmed in Fortran.

A good bet is that a technology will be around at least as long as it has been around (I think there's also a 'named law' for it). So I fully expect C to be around in one way or another for the next 50 years, it probably won't be as important anymore, just as COBOL or Fortran are not as important as they used to be.

One reason for C to disappear completely would be if computer architectures would change so much that current programming languages no longer even map to those new architectures (e.g. all the existing programming languages would need to be dumped anyway).

Re: 50 years of C, the good, the bad and the ugly [video]

#24
post #14
post #2

His final conclusion is that C has to go, just like COBOL, Fortran, and PL/I. I wonder how long it will take before C will be gone totally when you realize how much COBOL and Fortran are still around. Not so long ago, I came along a module for Python 'SciPy.interpolate' that happens to be programmed in Fortran.

C syntax is already way too rich and complex, not to mention the bazillions of gcc extensions required to compile the linux kernel. Namely, if it has to be "replaced", that would be with something with a much simpler syntax, which will require a bit more of finger power. We don't want to find ourself locked-in by very few compiler vendors (open source or not), that only because it is not reasonable to code a real-lif…

These are good ideas. The simplicity here is what I am going for.

Re: 50 years of C, the good, the bad and the ugly [video]

#25
post #2

His final conclusion is that C has to go, just like COBOL, Fortran, and PL/I. I wonder how long it will take before C will be gone totally when you realize how much COBOL and Fortran are still around. Not so long ago, I came along a module for Python 'SciPy.interpolate' that happens to be programmed in Fortran.

A good bet is that a technology will be around at least as long as it has been around (I think there's also a 'named law' for it). So I fully expect C to be around in one way or another for the next 50 years, it probably won't be as important anymore, just as COBOL or Fortran are not as important as they used to be. One reason for C to disappear completely would be if computer architectures would change so much that…

https://en.wikipedia.org/wiki/Lindy_effect

> The Lindy effect (also known as Lindy's Law[1]) is a theorized phenomenon by which the future life expectancy of some non-perishable things, like a technology or an idea, is proportional to their current age. Thus, the Lindy effect proposes the longer a period something has survived to exist or be used in the present, the longer its remaining life expectancy.

Re: 50 years of C, the good, the bad and the ugly [video]

#26
post #16
post #2

His final conclusion is that C has to go, just like COBOL, Fortran, and PL/I. I wonder how long it will take before C will be gone totally when you realize how much COBOL and Fortran are still around. Not so long ago, I came along a module for Python 'SciPy.interpolate' that happens to be programmed in Fortran.

It won't go away, but just like it happens with COBOL, Fortran, and PL/I, you won't see anyone dreaming of coding C until the end of their working days. Or maybe they will, given how much consultants in those languages happen to be paid, as no one else wants to touch them.

But coding C is actually fun!

Re: 50 years of C, the good, the bad and the ugly [video]

#27

Earlier quoted context omitted.

> Linux kernel is written in C Not exclusively in C, not anymore: https://docs.kernel.org/rust/index.html It might take another decade for a C-free build to be possible, though.

Only a decade? I don't think so. AFAIK Torvalds has also stipulated that any Rust code needs to be mirrored in C.

This right here. Rust only JUST got added to the kernel in 6.0 and I doubt that it will replace 30 years of C development any time soon.

Re: 50 years of C, the good, the bad and the ugly [video]

#28
post #2

His final conclusion is that C has to go, just like COBOL, Fortran, and PL/I. I wonder how long it will take before C will be gone totally when you realize how much COBOL and Fortran are still around. Not so long ago, I came along a module for Python 'SciPy.interpolate' that happens to be programmed in Fortran.

C is the best abstraction for many problem domains and that isn't going to change. I understand why folks coming from higher-level languages would dislike it, but for anyone coming from assembly it's a godsend.

The speaker discourages C for new projects, but that says more about the problem domains they work in than C itself. C is what it is because the hardware and assembly language are what they are. Folks who want a safer C should design a new hardware architecture with a "safe" assembly language and a new low-level language that targets it.

Re: 50 years of C, the good, the bad and the ugly [video]

#29
post #20
post #5

Great talk. Borland should have rated a mention though, their C compiler really popularized C development on Windows.

Most sane Borland customers were using C++ alongside Object Windows Library, not raw C alongside Win16. Even Petzold embraced C++, even if superficially, "This third edition has several changes. First, all programs are now compilable with either the Microsoft or the Borland compiler. All make files are generic and use environment variables for compiler flags, link libraries, and so forth. Second, all programs are now…

> Most sane Borland customers

Veiled insult noted ;)

I used both, but TurboC was a real game changer for me. I came from the ST using MWC and ended up in very unfamiliar territory on Windows, Borland TurboC made all the difference for me. It allowed me to be productive on an unfamiliar platform, compiles were absolutely lightning fast compared to anything the competition put out and was rock solid.

Edit: I just realized I still have ctrl-f9 more or less in my muscle memory. It's been decades...

Re: 50 years of C, the good, the bad and the ugly [video]

#30
post #2

His final conclusion is that C has to go, just like COBOL, Fortran, and PL/I. I wonder how long it will take before C will be gone totally when you realize how much COBOL and Fortran are still around. Not so long ago, I came along a module for Python 'SciPy.interpolate' that happens to be programmed in Fortran.

Can C really completely go away as long as there's embedded programming? Are there any other alternatives for that domain?
Post reply on HN