News for hackers. Stuff that matters.
Re:Nim Version 1.6.6 Released by TheEzEzz on Thursday May 05, 2022 @10:29AM (#31273798)
This is an interesting take, I do see the value. If I was trying to prevent this type of aliasing, I'd have the compiler throw an error if there were two aliased variables names (xyz and XYZ for example), rather than merging them automatically.
Re:Nim Version 1.6.6 Released by PMunch on Friday May 06, 2022 @03:47AM (#31282494)
Since Nim is statically typed you can't simply create a new variable with the same name as an existing one without errors. You can shadow variables in a deeper scope, but then only the latest version is available. Defining a function xyz and then trying to define another function xyZ is indeed an error.
Re:Nim Version 1.6.6 Released by xigoi on Thursday May 05, 2022 @10:37AM (#31273912)
That's what --styleCheck:error is for.
Re:Nim Version 1.6.6 Released by nimmer on Thursday May 05, 2022 @12:58PM (#31275816)
No. Nim always throws an error if you try to define multiple variables/procs that are conflicting.

--styleCheck:error strictly enforces camel case.