3 ms·
Two identifiers are considered equal if the following algorithm returns true: proc sameIdentifier(a, b: string): bool = a[0] == b[0] and a.re
by scardine 11y ago
Two identifiers are considered equal if the following algorithm returns true:
proc sameIdentifier(a, b: string): bool =
a[0] == b[0] and
a.replace(re"_|–", "").toLower == b.replace(re"_|–", "").toLower
So, right, looks like it is case sensitive for the first character allowing the same convention from Python. Still, I find it dangerous:
m_insensitive == min_sensitive
- klibertp 11y agoThis would be caught by the compiler. If you have m_insensitive declared in current scope you won't be able to define min_sensitive in this scope, the compiler would throw an error.