Re: Automated indentation - proposal

Donald Beaudry (don@vicorp.com)
Fri, 13 May 94 13:14:00 EDT

m> [mw@ipx2.rz.uni-mannheim.de (Marc Wachowitz)]
m> Hmm, I don't think I'm going to like such a little thing as a colon to
m> decide about such a big matter.

It is only a big matter from the perspecive of someone who has been
using the current Python syntax. From the point of view of a beginner
a colon simply means that a block terminator won't be used to
terminate the block.

m> As I think about it I'm even tempted to propose something very simple:
m> A code block may begin with the word "begin" and end with "end", which
m> both must be indented on the same level as the block. The two keywords
m> may only appear together or both be omitted.

Aside from the tokens used, this is pretty close to what is
implemented by the hack I posted a while back. The major difference
is that with my hack the indentation is not required.

m> Yes, it's a bit wordy, but then it's safe and simple, isn't it? ;-)

Well, yes, but... the wordy part bothers me quite a bit. The current
python syntax already provides enough information to delimit blocks in
most cases and is also quite terse (just a tiny bit too terse, IMHO).
We only need to cap off the remaining cases with an end statement.

So now I have to ask just how important is required indentation when
compared to being able to use m4 or write multi-line lambda
expression? Personally, I like the idea of required indentation and
formatting for many of the reasons that Guido has mentioned but the
current implementation makes me pay too high of a price for it. But,
like Tim, I am also interested in removing the restriction for certain
applications. Do we need two different mechanisms inorder to make
everyone happy? (everyone but Guido that is, I think the only way to
keep him happy would be to drop the thread and never bring it up
again:)

--Don
______ ______
\_\_\_\ /#/#/#/
\_\_\_\ ______
\_\_\_V#/#/#/ Donald Beaudry don@vicorp.com
\_\_/#/#/#/ V. I. Corporation uunet!vicorp!don
\_/#/#/#/ 47 Pleasant Street PHONE: (413) 586-4144
V#/#/#/ Northampton, MA 01060 FAX: (413) 586-3805