News for hackers. Stuff that matters.
Re:Some obscure C features by shouldgowork on Thursday January 25, 2018 @06:19PM (#16235690)
We've been hearing "how long will the problems of C persist" mere persist before people realize there might be reasons it's the most successful programming language yet invented?
Re:Some obscure C features by pcwalton on Thursday January 25, 2018 @07:46PM (#16236171)
There are definitely reasons behind C's success. Most important was that it was the language of Unix, which spread like wildfire in the '70s and '80s because it was free.

There are equally important reasons why C's usage has been in steady decline from the '90s to today.

Re:Some obscure C features by WalterBright on Thursday January 25, 2018 @08:30PM (#16236360)
> Most important was that it was the language of Unix

More important was it was the only language that really worked on DOS, which ruled the computer biz for 10 years. I would guess 80% of programming was done for DOS, and C was a very good fit for the 640K systems.

Re:Some obscure C features by pjmlp on Friday January 26, 2018 @04:32AM (#16237944)
On my corner of the planet we were using Turbo Pascal, Turbo Basic, Quick Basic, Clipper, FoxPro, DBase.

C and C++ had no special place on the spectrum of programming languages usage, unless we were porting code between MS-DOS and UNIX.

Until it was time to move into Windows, and anyone not using C or C++ started to be left behind, manually writing FFI wrappers (e.g. Turbo Pascal/Delphi) and we eventually migrated to one of them.

Re:Some obscure C features by sedachv on Friday January 26, 2018 @04:46AM (#16237997)
None of that is true at all. Turbo Pascal was hugely popular on DOS in the 1980s into the early 1990s. It wasn't until Windows 3.1 that Turbo Pascal really started losing market share to C. You are also completely forgetting about Apple. IBM PC compatibles did not even pass 50% market share until 1986.
Re:Some obscure C features by pcwalton on Friday January 26, 2018 @01:14AM (#16237361)
Well, sure, but Microsoft wouldn't have chosen to promote C if not for the success of Unix. :)
Re:Some obscure C features by pjmlp on Friday January 26, 2018 @04:27AM (#16237926)
Quite true, and on those days Microsoft was equally promoting Quick Basic and Quick Pascal, while writing MS-DOS in pure Assembly.
Re:Some obscure C features by pjmlp on Friday January 26, 2018 @04:28AM (#16237931)
No, C got famous thanks to UNIX, just like we have to use JavaScript thanks to the browsers.
Re:Some obscure C features by Avshalom on Thursday January 25, 2018 @07:00PM (#16235936)
Path dependency is why. It's not complicated, it's just expensive to overcome.
Re:Some obscure C features by akvadrako on Friday January 26, 2018 @03:09AM (#16237670)
I think only recently has a language been invented which has a good chance of replacing C and that's Swift. It's like C++ done right, it's user friendly, pragmatic, backed by a huge company and doesn't use GC.
Re:Some obscure C features by pjmlp on Friday January 26, 2018 @04:32AM (#16237945)
Reference counting is a GC algorithm.