27 ms·
Then you end up with an ecosystem with mixed conventions. Not good IMO.
by khaledh 5y ago
Then you end up with an ecosystem with mixed conventions. Not good IMO.
- patrickmn 5y agoYou 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 :) )
- elcritch 5y agoSame 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.
- cma 5y agoYou 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?
- 0-_-0 5y agoActually, in Nim "functionName", "function_name" and "functionname" are equivalent and interchangeable
- deleted 5y ago[deleted]
- lenkite 5y agoSo 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.
- planetis 5y agonimgrep solves this, you might not like it, but people who have actually tried it are fond of it.
- nimmer 5y agoI 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.