Hacker News new | ask | show | jobs
by high_na_euv 335 days ago
.so .o .a .pc holy shit, what a mess

Why things that are solved in other programming ecosystems are impossible in c cpp world, like sane building system

2 comments

> Why things that are solved in other programming ecosystems are impossible in c cpp world, like sane building system

This is such an ignorant comment.

Most other natively compiled languages have exactly the same concept behind: Object files, Shared Libraries, collection of object and some kind of configuration description of the compilation pipeline.

Even high level languages like Rust has that (to some extend).

The fact it is buried and hidden under 10 layers of abstraction and fancy tooling for your language does not mean it does not exist. Most languages currently do rely on the LLVM infrastructure (C++) for the linker and their object model anyway.

The fact you (probably) never had to manipulate it directly just mean your higher level superficial work never brought you deep enough where it starts to be a problem.

>The fact you (probably) never had to manipulate it directly just mean your higher level work never brought you deep enough where it starts to be a problem.

Did you just agree with me that other prog. ecosystems solved the building system challenge?

They solved it by building on top of what C (or LLVM, to be precise) does, not by avoiding or replacing it.

What should C do to solve it? Add another layer of abstraction on top of it? CMake does that and people complain about the extra complexity.

Bro, cmake is garbage. Having to debug cmske scripts is pain

Also how e.g dotnet builds on top of c or llvm?

> Did you just agree with me that other prog. ecosystems solved the building system challenge?

Putting the crap is a box with a user friendly handle on it to make it look 'friendlier' is never 'solving a problem'.

It is barely hiding the dust under the carpet.

I think people today often do not understand any more that C like many other things in the UNIX world is a tool, not a complete framework. But somehow people expect a complete convenient framework with batteries included. They see it has a deficiency that C by itself does not provide many things. I see it as one of its major strengths and this is one of the reasons why I prefer it.
Sane building system is pretty much basic thing in modern language

You'd expect something as mature as C to have such a thing by default

Thanks for confirming my point ;-)
Because those other ecosystems assume that someone has already done the work on the base system and libraries that they don't have to worry about them, and can focus purely on their own little islands.
More like, in other ecosystems, especially the compiled languages that weren't born as part of UNIX like C and C++, the whole infrastructure also takes building and linking as part of the whole language.

Note that ISO C and ISO C++ ignore the existence of compilers, linkers and build tools, as per legalese there is some magic way how the code gets turned into machine code, the standards don't even consider the existence of filesystems on header files and translation units locations, they are talked about in the abstract, and can in all standard compliant way be stored in a SQL database.