3 ms·
Or just disallow platform headers.
by jstimpfle 10y ago
Or just disallow platform headers.
- geofft 10y agoAgain, if you're disallowing platform headers and writing tooling to make sure you're never calling libc, what's the advantage of writing in C? You have all the headaches of switching to a new language, with none of the features. And, honestly, one of the features is "vibrant community of developers." Even if Go and Rust were bad languages, which they're not, they'd still be better choices than C-with-custom-in-house-restrictions-and-libc-wrappers, simply because of the communities around them. If you're writing in Rust, someone else has already written the safe C wrappers, and if they haven't, there's a community of people who will code-review your wrappers for safety and merge them into a centrally-maintained project, which is extremely useful.
- jstimpfle 10y agoI'm not advocating use of C, just pointing out a simpler way to check dependencies. To answer your question though, the advantage of using C is certainly not the notorious bad-habits standard library. C is fun and productive exactly where there's just you and some bits and bytes to bang around. Coding in the small. Not platforms and architectures.
- kazinator 10y agoYou can easily access external symbols in C without including a header. The external refs in an object file are the accurate info about what is referenced.
- jstimpfle 10y agoGranted. Just as you can easily corrupt memory. Just as you can statically link libc, without it showing up in the symbol table.