Re: multi-line expressions

Uttam M. Narsu (narsu@styx.hks.com)
Fri, 25 Feb 1994 09:17:37 -0500

On Feb 25, 12:09am, Ty Sarna wrote:
> Subject: Re: multi-line expressions
> I think it's one of Python's nicest features, and after working with it
> for a while, C's braces seem as stupid and unneccesarily verbose to me
> as Pascal's BEGIN/END seem to a typical C programmer. I also hate to
> see a good language compromised just to satisfy people's prejudeces (and
> it really is a predudice -- the people who object have almost
> universally never tried it).
>
> If we must change it, I'd have to vote for braces. I'd rather leave a
> good thing the way it is, though.

>-- End of excerpt from Ty Sarna

I don't think it is a matter of one (braces, BEGIN/END) vs. the other
(indentation), but *adding* additional constructs that the parser can handle as
substitutes for the INDENT/DETENT tokens. Haskell, which also uses indentation
(their term for it is layout) also accepts semicolons and { and } as substitutes
for layout. This makes writing multi-line lamdas (hey, we're back on the
original topic ;-) much easier.

As a programmer, I like layout (indentation); but I also would like the ability
to delimit code regions explicity. As another poster pointed out, if you are
going to generate python code from some GUI front end, generation of
non-whitspace delimited code may be easier (I am not convinced of this, though),
and definitely is more compact.

-- 

Uttam M. Narsu E-mail: narsu@hks.com

Hibbitt, Karlsson & Sorensen, Inc. Tel: (401) 727-4200 x 4442 1080 Main Street, Pawtucket RI 02860 Fax: (401) 727-4208