Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C's memory model also precludes decent string handling also, yet it has a string library. But that's it; the only other data structuring provided is the qsort function for sorting arrays and bsearch for searching them. I think it's deliberate. It looks like ISO C tends to avoid specifying new library features that can (and likely would be) be written entirely in C.


> it has a string library

But not a decent one :-)


Making the point. C is not a language for convenient canned solutions. But I'm not too sad about that. There are a myriad ways of doing strings, and most high-level programming languages are still stuck in the 90s with UCS-2 encodings or such, and offering only solutions that don't scale well for, say, dozens of megabytes of strings. C isn't stuck, at the cost of convenience.


I did say "precludes decent string handling"!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: