Some thoughts on the 'reveal' operator
Ka-Ping Yee
ping@lfw.org
Tue, 28 Sep 1999 11:40:50 -0700 (PDT)
On Mon, 27 Sep 1999, Mark S. Miller wrote:
>
> As long as we're talking syntax design, I'll go ahead and revive an old
> question: Ping especially has long advocated that E adopt Python's use of
> indentation rather than curly brackets for block structure.
That's a bit stronger than i would have described my position. I do
indeed like the visual simplicity of Python which is due to the lack
of curly braces, but the argument that E needs braces to be a decent
command-line language seems quite sound. Although Python programs
are beautiful to read, they're troublesome to enter interactively.
> My counter-argument has been we tried that in Joule, but got killed by tab
> ambiguity. Most everyone agrees that text files should be considered to
> have a tab stop every N positions, but many passionately insist (as I do)
> that N is 8, while others insist with equal passion that N is 4.
I passionately insist that tab characters be eradicated from all
source files, precisely to avoid this ambiguity. If i use spaces
everywhere i can be sure that my code will be readable independent
of where it appears.
> (Note that I also believe and advocate that one should indent one's code to
> 4-space indentation boundaries, and that editors should interpret the tab
> key on the keyboard to position the cursor to the next indentation
> boundaries. These issues are not coupled.)
I agree with both of the above. For vim users:
:set ai et sw=4 ts=8
> Except that Python works. What does it do?
Python interprets tabs in the "normal" Unix way, i.e. move to the next
tab stop where tab stops are in columns { 1 + 8k, k in Z }. Most
Python programmers indent four spaces and either avoid tabs or use
8-column tabs.
> Alternatively, how about if tab was simply not considered as valid
> character to be present in E source code?
Interesting! You know, you might get lynched for doing this, but
i kind of like it.
-- ?!ng
"Don't worry about people stealing an idea. If it's original, you'll
have to jam it down their throats."
-- Howard Aiken