|
|
|
|
|
by trymas
1647 days ago
|
|
Agreed. First world problem, though I've tried couple of times to get into nimlang, but this feature is such an anti-pattern (anti-feature) that it drove me crazy. I could not easily and reliably grep/search anything. Not to mention that reading code requires extra mental overhead (especially being new to the language), that `getAttr`, `get_attr`, etc., are actually the same thing. Why this was implemented into the language itself, instead of left as a suggestion or a standard is beyond me. quick edit: also, everything is imported globally (if that's the right term? like in python `from package import *`). So when you see function call, you need to look it up all the time where it comes from. edit2: apparently I am not alone :) |
|
> Not to mention that reading code requires extra mental overhead (especially being new to the language), that `getAttr`, `get_attr`, etc., are actually the same thing.
On the contrary, the language prevents confusion due to mixing getAttr and get_attr in the same codebase and bugs from using the wrong one.
Unsurprisingly, many safety-critical environments have policies to enforce consistent naming styles.
The linter will convert both to "getAttr" and the compiler will complain if the user tries to define the same proc twice.