Whitespace as syntax (was Re: Python Rocks!)

thucdat1143 at my-deja.com thucdat1143 at my-deja.com
Thu Feb 10 11:11:55 EST 2000


Blaming white space and delimeters are just silly excuse.
In the hand of a good software engineer, even assembler dances and
sings.
There is no perfect language, there are only average and good SW
engineers.
Look up what Deja.com is looking for, none of the languages you listed
below, but a very weird one: Perl !

Dat

In article <87thrq$gf7 at news.or.intel.com>,
  "tye4" <tye4 at yahoo.com> wrote:
> Future language designers should learn from the blunders of Python
> and other languages.
>
> Listed below, from worst to best block delimiter schemes found in
languages.
>
> Pascal. Score: 2/10. Pascal is my most favorite lang... however, hate
those
> 'begins' - they create double indentation as shown below. This bug was
fixed
> in future incarnations of Pascal, e.g. Ada
>
> if foo then
>   begin
>      bar;
>      stool;
>   end;
>
> -------------------------------------
>
> C++/Java. Score: 5/10
> if (foo)
> {
>     bar();
>     stool();
> }
>
> --------------------------------
>
> Python. Score: 7/10.
> Good points of Python:
> 1) No semicolons at end of line
> 2) No 'begin' or '{' for start of a block
> 3) Forces programmers to indent (improves readability)
>
> Bad points:
> 1) No visible indicator for end of a block
> 2) If indentation level is 2 or 3 spaces, ending of block even more
harder
> to discern
> 3) Have to pay careful attention to the properties of Editors (does it
> convert tabs to spaces? etc.)
> 4) Forces programmers to indent (potential source of errors if tabs
and
> spaces are mixed)
>
> if foo:
>     bar()
>     stool()
> x = 10
>
> ---------------------------------------
>
> Ada. Score 10/10
> No redundant 'begin' or '{'. Visible indicator of end of a block
>
> if foo then
>     bar;
>     stool;
> end if
>
> XML: Score: 11/10. Simple and intuitive block begin and end.
>
> <item>
>     <prog_lang name = Python>
> </item>
>
> tye4
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list