[wplug] Indenting to control block structure [was: RE: first language]

Tom Moertel tom at moertel.com
Tue Apr 1 17:47:18 EST 2003


On Tue, 2003-04-01 at 11:21, Weber, Larry A wrote:

> I can't tolerate a language that is whitespace dependent.  Python uses
> indentation instead of brackets.

Don't knock it until you have spent a few months using it.

I'm a big fan of the Haskell programming language, which lets you use
either layout (indentation) or brackets to define logical blocks.  After
a few months of coding in Haskell, I now use layout-based blocks almost
exclusively.  I've tried it both ways, and for me the choice is
obvious.  Layout-based blocks improve the S/N ratio, eliminate clutter
and redundancy, and give programmers better control over vertical white
space, which when used wisely makes code more understandable.

In fact, I like layout-based blocks so well, I brought them to Perl:

    http://www.kuro5hin.org/story/2003/3/18/235625/457

So, don't write them off until you have given them a good, long try. 
You might discover that you have been missing something good.

Cheers,
Tom





More information about the wplug mailing list