Python and Whitespace
A friend of mine (who shall remain unnamed) recently blasted Python and the way it uses whitespace, saying that whitespace should not matter in code. He seems to feel that braces are a much better way of denoting a hierarchy, and frankly I think he’s insane for it. Firstly, how many people actually completely leave out whitespace when writing in Java or C# for example? Most IDEs put it in for you, and reading the code would be a nightmare without it. Secondly, have you ever had a complicated series of conditional statements or loops or combination thereof (we’ll give you the benefit of the doubt and assume there wasn’t an easier, better way to write that block) in a language that uses braces? Did you have fun making all the braces balanced, struggling to find where that last one should go? If you did, you may be a masochist, or you may just like the look of braces, and who am I to judge you for that? If you didn’t, give Python a try and enter a blissful world where {} are only used for dictionaries (ok so they may have other uses that I just don’t recall or haven’t learned yet, but that’s not the point). Your code will be just a smidgen easier to read and you’ll never have to balance braces again! Now if only they could do something about parentheses and brackets with lists and tuples…