Python 2.0

Dennis Lee Bieber wlfraed at ix.netcom.com
Sat Jun 5 05:14:41 CEST 1999


On 04 Jun 1999 15:07:05 -0400, Kumar Balachandran
<kumar*xspam*@*xspam*rtp.ericsson.se> declaimed the following in
comp.lang.python:

> if
> ...
> elif
> ...
> else
> ...
> fi
> 
> def
> ...
> ...
> fed
> 
> 
> while
> ...
> elihw or wend
>
	Ugh... I have never liked languages that use a reversed spelling
to signify the end of a block... "end if", "end while" all read easier
to me than "fi", "elihw"...
 
	At that level, I'll take Ada's more generic "end loop", as "for"
and "while" loops are both built up as conditions on a "loop ... end
loop" block.

> etc. It makes the language more elegant. When I see code using
> indentation or blank likes to achieve blocking of constructs, it
> reminds me of an old language (FORTRAN I think it was called:-).
>
	No FORTRAN that I know of ever relied on indentation, etc. to
block constructs. Heck, a true FORTRAN totally ignored white space.

	do 10 i = 1.20
	do10i=1.20
assignments, identical.

	do10i=1,20
	do 10 i = 1, 20 
loop, identical.

> The change is simple to achieve if backward compatibility is given to
> accomodate people that grew up with FORTRAN.
>
	FORTRAN 77 added a nice blocked IF

	IF (cond) THEN
	ELSE IF (cond) THEN
	ELSE
	END IF
but again, no required indentation. Indentation is solely up to the
programmer for understanding of code -- Python's usage I find nice, as
it ensures visible blocking without having to match start and end
markers.

	Fortran 90 (for some reason it has now been declared that
"Fortran" is not a contraction of "FORmula TRANslator" but a proper
name, and to be treated with lowercase <G>) even permits the use of <, >
in conditionals !
 

--
 > ============================================================== <
 >   wlfraed at ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed at dm.net     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page: http://www.beastie.dm.net/         <
 >            Home Page: http://www.dm.net/~wulfraed/             <




More information about the Python-list mailing list