by federico3 · 10y ago · 0 comments
You can write ClassesLikePython and variables_like_python in Nim.
Sometimes people end up having dangerously similar variable names in the same scope, e.g. username and user_name, where an incorrect tab-completion might introduce a bug. Nim would require the developer to choose better names.
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