Fully Bracketed Syntax

Robin Becker robin at jessikat.demon.co.uk
Thu Feb 10 18:59:37 EST 2000

In article <65118AEEFF5AD3118E8300508B124877073D74 at webmail.altiris.com>,
Mike Steed <MSteed at altiris.com> writes

>> I guess what I'd like is some clear reasoning about
>> bracketing and indenting that warrants such a feature 
>> of a language.
>In his book Code Complete, Steve McConnell calls this syntax "pure blocks".
>Ada is the only language he mentions that implements this.  (Didn't Modula-2
>do this too?)  One of McConnell's rules is that the visual layout of the
>code should reflect its logical structure in order to maximize readability.
>In your example, the three lines inside the if should be indented (as they
>are) to indicate that they are suborinate to the conditional.  McConnell
>likes pure block syntax best because it lends itself more readily to this
>style than begin..end and {..}.
>In this sense, Python is even better, because the layout of (valid) code
>always corresponds to its structure.  (That is, if you ignore the one-line
>form "if a: blah".)

wasn't there something called comb structure?
Robin Becker

More information about the Python-list mailing list