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

Python (the 90% of programs 2.x branch) is horrible. It makes the cardinal mistake of mixing binary data and encoded data in one String type.

C is much better, because at least it doesn't pretend to support encodings. So you're forced to use a 3rd party library anyway.



> C is much better, because at least it doesn't pretend to support encodings. So you're forced to use a 3rd party library anyway.

C is better because it _doesnt_ provide some kind of interface into encoding. A byte is a byte is a byte. Whether that's some slice of a binary blob or the first byte in a multi-byte unicode string is completely irrelevant. The most infuriating thing I've found with higher level languages (Ruby/Python/etc.) is their abstractions on top of string encodings that fail to cover the hundreds of thousands of edge-cases (which, they rightfully shouldn't cover either), meaning that the only time you do end up having to wrangle encodings is when things go south and you have to fight the language's defaults just to get some stupid email address that most likely had a bit flip in transit somewhere to properly write to a CSV.




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

Search: