Hacker News new | ask | show | jobs
by pjmlp 3123 days ago
> The need to standardize things like std::filesystem was my point.

Which circles back to my statement about "The C mentality of some devs dragged into C++ world.".

Many useful C++ libraries were not standardized in the early days beyond STL, because many thought C++ should be like C where libraries are whatever the OS provides and nothing else.

Which is clearly visible in the decision to have ANSI C and POSIX APIs as two separate standards, although most C compilers try to provide some kind of additional POSIX compatibility, specially visible in non-POSIX OSes.

Thankfully, the ANSI C++ committee realized the mistake and now we are getting a useful set of libraries into the standard.

As for compilation flags, even for C it is only true if all compilers on the platform follow the same ABI.

And you still need to provide all variants anyway (debug, single and multithreaded, hard and soft float, pre-defined pre-processor macros, ...).

C ABI only appears to be simple in OSes that happen to be written in C.

Grated that is the case nowadays with most being UNIX clones, besides Windows and mainframes, but it wasn't always like that.

I remember the pain of trying to mix multiple C compilers back in the 90's.

1 comments

All good points.

> C ABI only appears to be simple in OSes that happen to be written in C.

I'd say that C is the only language that (mostly accidentally and non-standard, for the reasons you state) provides a simple a (relatively) stable ABI.