News for hackers. Stuff that matters.
Re:Nim 2.0 thoughts by khaledh on Saturday May 15, 2021 @11:35AM (#27166139)
Then you end up with an ecosystem with mixed conventions. Not good IMO.
Re:Nim 2.0 thoughts by patrickmn on Saturday May 15, 2021 @11:51AM (#27166287)
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 :) )

Re:Nim 2.0 thoughts by cma on Saturday May 15, 2021 @09:39PM (#27170498)
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?

Re:Nim 2.0 thoughts by elcritch on Saturday May 15, 2021 @07:33PM (#27169911)
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.
Re:Nim 2.0 thoughts by 0-_-0 on Saturday May 15, 2021 @03:21PM (#27168070)
Actually, in Nim "functionName", "function_name" and "functionname" are equivalent and interchangeable
Re:Nim 2.0 thoughts by lenkite on Saturday May 15, 2021 @10:05PM (#27170612)
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.
Re:Nim 2.0 thoughts by nimmer on Sunday May 16, 2021 @07:37AM (#27172959)
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.

Re:Nim 2.0 thoughts by planetis on Sunday May 16, 2021 @04:48AM (#27172242)
nimgrep solves this, you might not like it, but people who have actually tried it are fond of it.