3 ms·
This is the opposite of a footgun. Imagine if DNS was case sensitive and GMAIL.COM belonged to a domain squatter. Nim prevents that. It's that simple.
by nimmer 4y ago
This is the opposite of a footgun. Imagine if DNS was case sensitive and GMAIL.COM belonged to a domain squatter.
Nim prevents that. It's that simple.
- TheEzEzz 4y agoThis 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.
- xigoi 4y agoThat's what --styleCheck:error is for.
- nimmer 4y agoNo. Nim always throws an error if you try to define multiple variables/procs that are conflicting. --styleCheck:error strictly enforces camel case.
- PMunch 4y agoSince 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.