|
|
|
|
|
by theamk
141 days ago
|
|
I don't see how this can work. You have your personal string library.. and you move to a new project, and it has it's own string library (it's pretty much given, because stdlib C library sucks). So what next? Do you rewrite the entire project into _your_ string library, and enjoy familiar environment, until the next "experienced C programmer" comes along? Or do you give up on your own string library and start learning whatever project uses? And this applies to basically everything. The "personal database" becomes pretty useless the moment the second person with such database joins the project. (This is a big part of Python's popularity, IMHO. Maybe "str" and "logger" are not the best string and logger classes in the world, but they are good enough and in stdlib, so you never have to learn them when you start a new project) |
|
In C this standardized string interface type happens to the poiinter to a zero-terminated bag of bytes, not exactly perfect in hindsight, but as long as everybody agrees to that standard, the actual code working on strings can be replaced with another implementation just fine.
E.g. a minimal stdlib should mostly be concerned about standardized interface types, not about the implementation behind those types.