> I would love to see articles discussing these issues, but at the same time, I 
> wonder if it's a good idea to bring more spotlight to style insensitivity.

Sorry, it has been a looong time since I posted here as I do no longer use Nim, 
but… I always felt a bit "weak" to sell Nim's style insensitivity with the 
argument that it is nice to pick the style you prefer. I consider the inability 
to mix styles to be a far greater advantage; consider the following C code:
    
    
    int Result = 0;
    for (int i = 0; i < 100; i++) {
        int result = f(x);
        if (result < 0) {
            result += g(x);
        }
        Result += result;
    }
    
    
    Run

This is an abridged version of some code I had to work on several years ago. 
Such a mixture of styles would immediately trigger an error in Nim, as `Result` 
and `result` are the same variable. (This is the same reason why I am a fan of 
case insensitivity in variable names, like in good old Pascal.) The same would 
apply if somebody tried to declare two variables `myAccum` and `my_accum` in 
the same context.

When encouraging my colleagues to try Nim, I often found that this argument was 
quite effective.

Reply via email to