3 ms·
I started looking at Nim a few months ago, but I didn't like the feature where it ignores underscores and capitalization. It seems to me that this would make gr
by akovaski 5y ago
I started looking at Nim a few months ago, but I didn't like the feature where it ignores underscores and capitalization. It seems to me that this would make grepping harder on larger projects.
I suppose a linter or style-guidelines-and-not-making-mistakes invalidate this issue. For anyone that has used Nim, has this been a problem in practice?
- haxscramper 5y agoNo, never. Actually the most problem I've ever had with this feature is seemingly unending discussions that come up in almost every single HN discussion ever, like https://news.ycombinator.com/item?id=28651040 https://news.ycombinator.com/item?id=28651040 > would make grepping harder on larger projects There is a built-in tool `nimgrep`, but honestly I never even need for that - `rg` worked perfectly fine each time I had to do something like that.
- mst 5y agoWithin a specific project, you pick an approach and stick to it, just like you should do for any given convention within a project. The idea is to make it easier for projects using different conventions to be built on top of each other without making things harder to read - and in practice it actually works really well at that. On the upside, people freaking out over the style insensitivity makes for a nice change from people freaking out over nim caring about whitespace, so at least we get some variety in our aesthetic worrying from people who've not had time to try the language yet :D
- akovaski 5y agoHa, I wouldn't have thought to criticize the spacing, but I did see one person complain as I explored old Nim discussions. Nim being strict on tabs is something I see as a good feature for the same reason the style flexibility made me instinctively flinch back. I've experienced mixed tabs and spaces in Python code and I do not like it; the flexibility leads to inconsistency.
- mst 5y agoTabs vs. spaces hides though. Inconsistent naming is visible in diffs in any language, style flexibility or not :)
- moigagoo 5y agoI've been using Nim for hobby programming for a few years now. I'm maintaining the Norm package, it's an ORM for SQLite and Postgres. Not a huge project but not a hello world either. Style insensitivity has never caused a single problem for me. Honestly, this is the most unimportant language feature, I don't get why it causes such fuss every time Nim is mentioned.
- iffycan 5y agoIt has never caused a problem for me. I didn't even know it was a "feature" until I'd used Nim for a year. In theory it seems like a terrible idea. In practice, it has never caused any problems.