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

I'm going to be a bit controversial here and say that that mapping logic should always exist even if toLower() were reliable across all locales. You're mapping between different use cases here, eg. internal to logfile to API to database to method name to whatever, and inserting magic transformations in your constant values rather than treating them as different tokens for different use cases constrains you and introduces unnecessary amounts of "magic".


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

Search: