These points are easily counterable, but unfortunately we do have to have pithy 
counters to nip them in the bud. If we keep countering them with logic, sooner 
or later the responses gain their own momentum (I hope).

They're usually based on folk lore of bad experiences with languages like 
Python, or developers who somehow aren't aware that case insensitive languages 
have been around for more than half a century.

> indentation bad

The old "invisible characters affecting control flow" meme, or "my copypasta 
might get formatted wrong!".

Counter: reading non-indented code in braced languages sucks.

  * Indentation isn't invisible (seriously wtf). Tooling can even colour it for 
you.
  * Bad indentation in braced languages will make you question bracing just the 
same.
  * Enforces readability.
  * No tabs, no ambiguity.
  * Nimpretty exists.
  * Online copypasta works fine and most editors even indent for you. Are 
people really copying and pasting code without even looking at it?



> style insensitivity bad

Often stated as "cannot grep" and "developers can mix styles".

Counter: the opposite is true, it lets you enforce your style consistently.

  * You can enforce _your style_ for libraries with different styles; 
uniformity improves.
  * Nimpretty automates this.
  * This makes searching trivial. Absolute worst case there's regex or nimgrep, 
in practice this is never needed due to the above.
  * Static types and tooling lets us find declarations.



"Abc != abc but abc == aBc == ab_C == a_BC is so confusing!".

Counter: this is just case insensitivity except for the first letter. 
Underscores are ignored.

  * When is it a good idea for `a_b != ab`? Naming matters.



Bonus: "Case insensitivity causes variable name clashes"

Counter: case sensitivity causes variable name clashes.

  * `abc` != `aBc` != `abC` is a bug waiting to happen.
  * Static typing catches these bugs before they happen.
  * Variable names matter.
  * Case insensitive languages (e.g., Pascal) haven't had these mythical 
problems either.



Bonus: "import * is bad"

Counter: for Python, yes.

  * Nim resolves by types not just names.
  * Nim won't compile when ambiguous. Python silently overwrites definitions.
  * Static typing lets tooling jump to definitions easily.
  * I rarely mention `from x import nil` because it's very, very rarely needed 
and is often a solution to a problem we just don't have because of the above. 
Still, it can ease some Python users minds enough to give it a try.



I'm sure I've seen some of these points mentioned in an article too. Maybe we 
need a wiki entry on them if we don't already. IMHO these need to be very 
clearly expressed otherwise, as you say, the whole comment section will devolve 
into myths and maybes.

Python also had a lot of resistance to significant whitespace but it's doing 
okay. These aren't real barriers, and Nim hugely improves on Python's flaws in 
these areas.

Reply via email to