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

I was unpleasantly surprised by how much locales are used for seemingly trivial things. It's even the case with the C++ iostreams stuff.

I ended up writing my own functions in an 'ascii' namespace to avoid all this as much as possible.

This [0] rant about locales and how they're nigh-on impossible to use correctly is quite amusing (slightly NSFW)

[0] https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...



I understand that wm4 was probably a pretty difficult person to work with, but he got stuff done well and from the safe distance of my chair he was a rather entertaining fellow. The other mpv devs can't miss him but I kinda do.


As a follow up, if anyone uses `boost::lexical_cast` a lot, try defining

    BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
for some performance speed-ups and code size reductions




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

Search: