Nim programming language finally hit 1.0

Chris wendlec at tcd.ie
Thu Sep 26 10:31:41 UTC 2019


On Wednesday, 25 September 2019 at 20:56:49 UTC, JN wrote:
>
> I guess it's just a matter of preference. Personally, "forced 
> indentation" is one of my favourite features of Python. I 
> indent all my code blocks in C/C++/D/Java/C# anyway, so braces 
> are mostly unnecessary noise to me. Also, I think you 
> underestimate how hard it is to find a missing brace in code 
> sometimes. For example if you forget a closing brace on a 
> method, and then the compiler thinks next methods are inner 
> methods and it breaks on a "class Foo" declaration 200 lines of 
> code later.

I know, I've had my fair share of both (missing braces and 
missing indentation), but I find missing braces easier to fix and 
they don't happen nearly as often as missing / wrong indentation. 
If you have to move lines and blocks around for testing / 
debugging / refactoring purposes, forced indentation can be a 
real PIA, and you have to spend time fixing things that shouldn't 
be broke in the first place. Worst of all: you don't just have to 
look for the missing brace, but check the optical alignment on 
the screen, now, what will you do if the statement opening the 
block is (50-100 lines) out of sight? A waste of time, or 
"diminishing returns" [1].

[1] https://en.wikipedia.org/wiki/Diminishing_returns


More information about the Digitalmars-d mailing list