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

Then you end up with an ecosystem with mixed conventions. Not good IMO.


You can literally do whatever you want with any library you use in your own codebase and have a consistent convention in your own code regardless of what your dependencies' authors preferences are. In other words, if the library authors used camelCase but you want to use snake_case in your code, you just do it.

It's very strange at first, and I had the same reaction as you, but it's actually quite nice. (I say that as somebody who strongly dislikes snake_case :) )


You mean the language is case insensitive and drops _'s or something? Doesn't that break searchability with command line tools (or make for much more complicated regexes)?

Or do you just mean use a mixture just like you could in most other languages?


Same here, at first making camelCase and snake_case interchangeable seemed like a terrible idea. But in practice I can read and grok libraries that use either and in your code call it using your preference. It just kinda works.


Actually, in Nim "functionName", "function_name" and "functionname" are equivalent and interchangeable


So one needs to grep 3 times instead of once in a code-base. Why did the authors chose this abominable convention ? It makes maintenance a nightmare.


I never had this issue: do not mix different stiles across the same project.

Instead, you can import and use libraries that use a different stile without breaking your convention.


nimgrep solves this, you might not like it, but people who have actually tried it are fond of it.




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

Search: