News for hackers. Stuff that matters.
Re:Modern C [pdf] by pawadu on Monday November 28, 2016 @08:32AM (#13055249)
And yet, the OS and the browser you used to type this comment was written in C or a C-derivative like C++.
Re:Modern C [pdf] by pjmlp on Monday November 28, 2016 @09:00AM (#13055410)
Historical accident.

It could have been written in any other language that compiled to native code, if we had more options available.

Re:Modern C [pdf] by pawadu on Monday November 28, 2016 @09:04AM (#13055437)
Well, there are two types of people in this world

1. the type that do something

2. the type that claim they could do it better than the first group (this is by no means limited to programming, it is for example pretty common in politics)

So please show me an OS written in Go or Rust or Ruby or Python or Java that people can actually use for day-to-day tasks.

Re:Modern C [pdf] by pcwalton on Monday November 28, 2016 @10:56AM (#13056188)
I've been working full time for years on a browser written in Rust. Which category am I in?

Yes, C++ is very entrenched. That is a problem. We should be fixing that.

Re:Modern C [pdf] by loup-vaillant on Monday November 28, 2016 @11:56AM (#13056652)
There is such a thing as path dependence. C got ubiquitous because of reasons (UNIX?), and now we're stuck with it.

Now the historical accident theory is pretty obvious: it could have been an Algol, Fortran derivative instead of C, if only UNIX used that as a basis. C itself could have been designed differently, and if so would probably have different flaws and qualities.

Asking for a Rust/Go/Whatever OS is dishonest, because you know full well it will fail for reasons that have nothing to do with the underlying language's intrinsic qualities: even if that OS is great, nobody expect it to be so great we all have to switch away from Windows and Linux. Well, except maybe if we prove the correctness of the kernel, hence ensuring the absence of many vulnerabilities. Research is ongoing, I'd like to see where that goes.

Re:Modern C [pdf] by ArkyBeagle on Monday November 28, 2016 @06:48PM (#13059436)
C got ubiquitous well before Linux, at least. I'd date it back to the '80s on microcomputers ( mostly meaning DOS) .

Lots of Pascal, but Pascal really was an engineering constraint at the time if you were doing actual system programming. And back then, that was a serious consideration.

Re:Modern C [pdf] by pjmlp on Tuesday November 29, 2016 @01:46AM (#13061353)
Not in Portugal, we were using mostly using Turbo Pascal.

In the 80's using C on MS-DOS, was only seen by those that had UNIX at work or universities and wanted to work home.

It wasn't even C, rather SmallC or any other K&R dialect.

In any case, everyone that cared about performance was using TASM and MASM, writing everything in Assembly.

Re:Modern C [pdf] by pjmlp on Monday November 28, 2016 @09:53AM (#13055733)
If you pay me my monthly salary to prove you wrong, I will happily do it, should we discuss a work contract?
Re:Modern C [pdf] by DonaldFisk on Monday November 28, 2016 @12:43PM (#13056998)
Those who did something include the developers of Burroughs MCP, who used Algol 60; the developers of MULTICS, who used PL/1; the developers of Symbolics Genera, who used Lisp; and the developers of Oberon, who used the language Oberon.

I go along with historical accident to account for Unix's success, though Richard Gabriel thought it was a case of Worse Is Better trumping The Right Thing.

Re:Modern C [pdf] by sacado2 on Monday November 28, 2016 @11:14AM (#13056314)
The Oberon operating system is as old as linux, yet I'm pretty sure you use the latter more often than the former.
Re:Modern C [pdf] by pjmlp on Monday November 28, 2016 @11:53AM (#13056631)
Being an UNIX clone available for free instead of having to pay for expensive Solaris, Aix, HP-UX, SGI workstations, while BSD was busy fighting AT&T helped.

UNIX is the VHS of operating systems.