Hacker News new | ask | show | jobs
by enriquto 2424 days 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"

1 comments

> 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
great!

then I don't really understand nim's case insensitivity rules

Only the first char is case sensitive. The rest is case and underline insensitive;
Oh, my god! How do people reach this kind of ideas?