Hacker News new | past | comments | ask | show | jobs | submit login

And still doesn't cover more of the things modern apps care about.

It is only good for CLI applications and daemons.

EDIT: For the downvoters what are the POSIX APIs for:

- Graphics (besides the clunky CDE and OpenGL isn't POSIX)

- Thread/Task pools

- Bluetooth, NFC, GPS, fingerprint readers, ....

- Application containers




Is fingerprint reading within the scope of what OpenGroup is trying to do? POSIX doesn't specify whether you should make a web page with CSS2 or CSS3 either.


If the scope of POSIX is a portable UNIX API, it should cover some kind of portable hardware access API across UNIX like systems, no?

Currently it mostly covers hardware from PDP-11 systems still, anything else via /dev, ioctl, whatever, is vendor specific.

Last time I checked that weren't any portable API for USB for example.


Higher level languages (and libraries) seem to be defining the portable interfaces for a lot of what software needs to do now, which helps but essentially seems to punt the problem at the operating system level.

I guess portable interfaces may just end up needing to be defined over non-portable interfaces, and C may end up not being practical for anything that needs to be portable.

Higher level languages aren't bad, and it would probably be a good thing if a language like Rust became the de-facto for low-level. My feeling is that C is still the simplest to compile though, which I think is an advantage.


Simplest to compile, but very hard to optimize, hence why register and restrict are needed, among many other tricks.

But that is a talk for other day.


Most compilers I know of do register allocation better than nearly all humans where optimization is important.

Aliasing is a problem, but I don't think it's strictly inherent to C.


> Most compilers I know of do register allocation better than nearly all humans where optimization is important.

Nowadays yes, you are forgetting C has 40 years of research into compiler optimization.

We could easily beat the register allocator in the 90's with Assembly coding, specially in x86.

There is a quote from a famous woman in compiler research from the mid-80's, where she claims C semantics have thrown the optimization research back to the dinosaur age.

Sadly I cannot find it, as I don't remember the exact words.

> Aliasing is a problem, but I don't think it's strictly inherent to C.

Most languages have stricter semantics for aliasing and do not decay arrays into pointers.

Also they tend to have better type information, which can help the optimizer.


Far from being needed, "register" has been completely ignored by compilers for many years now.


Nowadays, but back when C was barely used outside UNIX it was essential.


Last I checked there wasn't even a portable way to make a new filesystem. POSIX standard is a lot like the C standard, far above and almost completely hardware agnostic.


Actually UNIX kind of plays the role of C runtime, but when the time for standardizing C came, they could only make into ANSI C features that were common across multiple hardware and OSes back in the late 80's.

So what was left out of ANSI C, is what became POSIX. Making any OS with ANSI C + POSIX compliant compatible with the original UNIX systems.

But unlike other programming languages, on C's case the evolution in terms of standard libraries stopped there.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: