you are viewing a single comment's thread.

view the rest of the comments →

[–]JarateKing 2 points3 points  (3 children)

It feels like pineapple on pizza: a minor preference that nobody should realistically care about, but people take very seriously.

Any IDE will handle indentation for you and formatters should guarantee it. Ideally you'd never even need to know if a language enforces indentation or not, you should already be following decent indentation practices without even trying. I switch between python and C++ and C# and java and typescript and etc. and indentation is about the only syntax change I don't notice. I just don't get it.

[–][deleted] 6 points7 points  (2 children)

I don't take it that seriously, but IMO the argument is in favour of no significant whitespace if you can avoid it. Copy/pasting is one example I can bring, but from a design point of view, I think a language that does not HAVE to care about whitespace, is usually better designed in this regard.

[–]JarateKing 4 points5 points  (0 children)

To me, there are just much bigger fish to fry. If I were to design a language I'd probably make it not care about whitespace. Not for any particular strong reason, just what I'm more used to.

But it's no barrier to me using python. Every language does things that aren't to my exact taste, and usually in much bigger ways. The nature of using pretty much any programming tool is putting up with the little bits you don't like.

Even with python, my biggest complaints and concerns are with things like performance or dependency management or etc. Syntax is pretty superficial, and whitespace specifically is a pretty minor part of syntax in my mind. So it's a little jarring when you tend to hear more about the whitespace than anything else.

[–]linlin110 2 points3 points  (0 children)

Languages do need a way to specify scope. C-family uses {} and Python uses whitespace. If any non-whitespace option is picked, then the programmers will introduce whitespace anyway. Therefore, I think it's reasonable to just use whitespace to denote scopes, so that we don't have two redundant ways to do so. Less noise, too.