3 ms·
C is a good language, but why does the standard library need to be in the language standard? It's perfectly possible for there to be competing modern libraries
by vortico 8y ago
C is a good language, but why does the standard library need to be in the language standard? It's perfectly possible for there to be competing modern libraries which implement everything from the stdlib which can be built completely from pure C source. Suppose I build libvortico, which had proper string handling, threading, filesystem, etc. There would then be no need to deal with stdlib quirks. Just use that as an alternative.
- umanwizard 8y agoYou're perfectly welcome to build your own library and put whatever you want in it. The reason there is a "standard library" is to make portability possible.
- vortico 8y agoBut portability has nothing to do with whether the library is standardized. One could port any API, whether from the standard or a simpleton like me, and port it in pure C and OS calls to any environment. One could even port a better API to wrap the stdlib calls, to add support for at least what the standard offers.
- umanwizard 8y agoYour argument goes through just as well for the base language itself. What's the point of having a C standard at all? Since you could just port your compiler to any platform...
- vortico 8y agoThe point of a language standard is to have multiple compilers and to be able to write code to some standard. The difference between these points is that with a "stdlib" alternative library, you can still have multiple compilers and write library function calls without following the standard, but simply the library's API. The reason I believe the stdlib shouldn't be a standard is for the same reason that libpng, libjpg, libzip, etc. aren't part of the C standard. It should be the software vendor's choice of which standard library to use.