same topic on forum
http://forum.nim-lang.org/t/525
i'd like to have underscores in variable names at least
and with the latest "implicit self" feature ({.this: self.}) it allows to write code similar to this:
https://github.com/urho3d/Urho3D/blob/master/Source/Urho3D/Scene/Node.cpp#L48
with simple "class variable" access via "classVariable_.something"
A separator has nothing to do at the end of an identifier.
maybe.
but virtually every language has trailing underscores
other options to use with implicit self are "m_var" or "mVar" are uglier than "var_"
example:
m_classVar.method =1
mClassVar.method = 1
classVar_.method = 1
They are not uglier than something that I cannot even talk about: "var with underscore (not to be confused with the other var without underscore)".
Massive downvote from me... This would introduce an ugly special case to the way Nim name resolution works for questionable benefits. More weird special cases => more sources for subtle and hard to find bugs.
Most helpful comment
They are not uglier than something that I cannot even talk about: "var with underscore (not to be confused with the other var without underscore)".