4 ms·
One idea is that two identifiers which differ by style (e.g. foo_bar and fooBar) should not appear in the same code base (in the sense that they should not be u
by pietroppeter 6y ago
One idea is that two identifiers which differ by style (e.g. foo_bar and fooBar) should not appear in the same code base (in the sense that they should not be used to refer to two different objects).
On the other side if a library is written in snake_case and your project is camelCase, you can keep your style throughout your project and still use that library.
From a practical point of view you should keep a consistent style and the official style for Nim is CamelCase.
This feature has never been an issue for those who actually use Nim, but it sure is something which is mentioned a lot by those who do not use it.
Note that first letter is case sensitive and the convention is to use Capital letter for types. The following is idiomatic:
type Person = object
var person: Person