[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT - trivial programming language



On Fri, May 28, 2004 at 07:55:49PM -0700, Steve Lamb wrote:
> s. keeling wrote:
> > Indentation is syntactical in python.  No, I don't know why.
> 
>     Better to ask why in most other languages there are two syntaxes.  One for
> the computer, one for the human.
> 
>     This is legal:
> if (foo){bar;}lese{baz;}
> 
>     So is this:
> if (foo)
> {
> bar;
> }
> else
> {
> baz;
> }
> 
>     But we're taught to do this (or something like it):
> if (foo)
> {
>     bar;
> }
> else
> {
>     baz;
> ]
> 
>     So make the machine read that like the human does and take out the
> portions the machine needs and what are you left with?
> 
> if (foo)
>     bar
> else
>     baz
> 
>     If we're taught to code that way *anyway* then we should make it
> significant because it is.

Because for good and for bad that will lock you into editor dependency
(you need the proper indenting capabilities) and coding style.

The later is not necessarily bad.

> 
> -- 
>          Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
>        PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
> -------------------------------+---------------------------------------------




Reply to: