Newbie : checking semantics

beliavsky at aol.com beliavsky at aol.com
Sun May 15 15:59:17 EDT 2005


elbertlev at hotmail.com wrote:

<snip>

> 2. Trust me (and other Python programmers most likely would agree)
this
> type of error happens much more seldom then newbies (especially
coming
> from strongly typed languages) imagine while adjusting to the
language.
>
> 3. Python advantages "overpower" drawbacks 10 to 1.
>
> 4. Most likely you never used Fortran :)

The Newbie is outnumbered on this issue in comp.lang.python, but he is
not alone :). In Fortran 77 and earlier versions, many run-time errors
resulted from

(1) misspelling a variable name, since variable declarations were not
required and IMPLICIT NONE (forcing declarations) was standardized only
in Fortran 90.

(2) passing variables of the wrong type (real instead of double
precision, scalar instead of array, etc.) to a procedure -- this could
not be checked at compile-time if the procedure and caller were
compiled separately and then linked. Fortran 90 added MODULEs, partly
to fix this.

I programmed in Fortran 77 for years before using Fortran 90 and find
that in the latter version I am more productive, since a program that
compiled was much more likely to be correct. I think many Fortranners
concur.

ANSI C 89 provides for more static type checking than the original K&R
C, and I think most C programmers appreciate this.

Looking at how other programming languages evolved, based on hard-won
experience, Python looks like a move in the opposite direction -- less
"compile-time" checking.




More information about the Python-list mailing list