acm-header
Sign In

Communications of the ACM

Kode Vicious

Sanity vs. Invisible Markings


programming code surrounded by white space

back to top 

Dear KV,

My team resurrected some old Python code and brought it up to version 3. The process was made worse by the new restriction of not mixing tabs and spaces in the source code. An automatic cleanup that allowed the code to execute by replacing the tabs with spaces caused a lot of havoc with the comments at the ends of lines. Why does anyone make a language in which white space matters this much?


Comments


Gunnar Wolf

You say in your article, Allowing any two symbols to represent the same concept, for example, is a definite no-no. This brought up a memory of a case where contradicting your advice was actually an improvement.
Many years ago, I learnt a Lisp dialect where the syntactical meaning of parentheses, brackets and brackets was identical they only were required to match (that is, no bracket could close a parenthesis). This _did_ improve on readability/maintainability of programs, as it allows to better spot where in a deep s-expression you were working.
Of course, bringing Lisp to any discussion on readability feels like cheating. In Lisp it's too common to drown in the layers upon layers of "toenail clippings".
The only worse offender than Lisp would be, of course, the "Whitespace" programming language, which introduces the novelty that any non-whitespace character is considered to be a comment, and the language definition consists of combinations of spaces, tabs and newlines. Yes, naturally, Whitespace proudly occupies a spot as an "esoteric programming language", useful for proving a point and setting up programming challenges, but nothing beyond that.


Displaying 1 comment

Log in to Read the Full Article

Sign In

Sign in using your ACM Web Account username and password to access premium content if you are an ACM member, Communications subscriber or Digital Library subscriber.

Need Access?

Please select one of the options below for access to premium content and features.

Create a Web Account

If you are already an ACM member, Communications subscriber, or Digital Library subscriber, please set up a web account to access premium content on this site.

Join the ACM

Become a member to take full advantage of ACM's outstanding computing information resources, networking opportunities, and other benefits.
  

Subscribe to Communications of the ACM Magazine

Get full access to 50+ years of CACM content and receive the print version of the magazine monthly.

Purchase the Article

Non-members can purchase this article or a copy of the magazine in which it appears.
Sign In for Full Access
» Forgot Password? » Create an ACM Web Account