Python’s Indentation and using whitespace to show …
Wednesday, April 17th, 2002...4:28 am
Python’s Indentation and using whitespace to show program structure
Dave thinks Python’s compulsory indentation used to convey the program structure is excellent. I’ve never used Python (I’m trying to find some time to learn it) but at uni I used OCCAM, a language for parallel processing on transputers. This used whitespace characters (tabs I believe) to represent program structure. Two problems with this. First, they’re whitespace characters – you can’t see them! Second, this only ever works when you have an intelligent folding editor to work with (if you do, let me know). Editing these programs in a standard IDE or text editor is annoying and almost impossible between different machines – you suddenly realise the last editor you used actually represented tabs as spaces etc.
So, sure if you have a folding editor or outliner using whitespace is fine. Personally, I like to see the characters which define the program structure.
Leave a Reply