So, first of all, thank you @spip for the effort! Very illuminating.

My 2 cents: may I suggest decoupling formal measurement (which, as some 
mentioned, should be numerical and rigorous) from best practice guidelines on 
Nim coding. Personally, I am more interested in the latter first and _then_ in 
the former.

Maybe this effort can become the beginning of an official "best practices" 
guide for the Nim package maintainers? There are some proposed guidelines for 
standard library 
([https://nim-lang.org/docs/nep1.html)](https://nim-lang.org/docs/nep1.html\)), 
but none exist that I am aware of for Nim package maintainers or Nim coders in 
general.

I also believe that numerical analysis should be predicated on more exact 
definition in the guidelines. For example the guideline "Code is well 
structured" might have a rule in it: "A single function should have no more 
than 6 levels of indentation." (just making it up, but you get the point). This 
is a) clear to a human and b) should be fairly easy to implement in a code 
analysis tool. Eventually I can even see a VSCode plugin that does this type of 
analysis on the fly and highlights offending code.

Reply via email to