3 ms·
> As an aside, is there some reason that using the same identifier with different cases is desirable? I do it all the time, in numerical code. If you have two
by enriquto 7y ago
> As an aside, is there some reason that using the same identifier with different cases is desirable?
I do it all the time, in numerical code. If you have two pairs of points, for example, it is very natural to name them "a,A,b,B"
- narimiran 7y ago> for example, it is very natural to name them "a,A,b,B" And just to clarify once again, since I'm not sure who will read which reply: those are NOT the same identifiers in Nim! let a = 11 b = 22 A = 99 B = 88 echo a == A # false echo b == B # false Run the code in the Nim Playground if you don't believe: https://play.nim-lang.org/#ix=20kr https://play.nim-lang.org/#ix=20kr
- enriquto 7y agogreat! then I don't really understand nim's case insensitivity rules
- rafaelvasco 7y agoOnly the first char is case sensitive. The rest is case and underline insensitive;
- enriquto 7y agoOh, my god! How do people reach this kind of ideas?