OT Re: Fully Bracketed Syntax

Jay Graves JGRAVES3 at austin.rr.com
Thu Feb 10 18:11:25 EST 2000


>if ( foo > bar )
>   do_something();
>   do_something_else();
>   done();
>endif
>
>I only know of one language which uses this syntax,
>and it's not in common use.  However, lots of us may


RPG does something like this and there is ALOT of RPG code in the world.
(view with monospacing)

C           FOO       IFEQ BAR
C                     EXSR FIRST
C                     EXSR SECOND
C                     ENDIF

but because it has a column based syntax, it does not allow ANY indentation.
to extend the example

C           FOO       IFEQ BAR
C                     EXSR FIRST
C           X         IFGT Y
C                     EXSR SECOND
C                     ENDIF
C                     ENDIF

is RPG's way of writing
if foo == bar:
    first()
    if x  > y:
        second()

I'm not saying I like it but I have gotten used to it.  Python is a breath
of fresh air to me.  I'm getting used to the indentation fairly quickly.
It's all in the editor you use.  if you have a 'real' editor which supports
'tabs->spaces' and has a indent/dedent command it shouldn't be any issue.

just my $.02.

Python Newbie....
Jay Graves





More information about the Python-list mailing list