Python is DOOMED! Again!

Ian Kelly ian.g.kelly at gmail.com
Wed Jan 28 18:33:49 CET 2015


On Wed, Jan 28, 2015 at 8:04 AM, Mario Figueiredo <marfig at gmail.com> wrote:
> In article <54c83ab4$0$12982$c3e8da3$5496439d at news.astraweb.com>,
> steve+comp.lang.python at pearwood.info says...
>>
>> Mario Figueiredo wrote:
>>
>> > Static analysis cannot and should not clutter executable code.
>>
>> (1) It isn't clutter. The human reader uses that information as well as the
>> compiler, interpreter, type-checker, IDE, text editor, correctness tester,
>> etc.
>>
>> (2) Algol, Ada, Boo, C, C#, C++, Cobol, Cobra, D, F#, Fantom, Fortran, Go,
>> Haskell, Java, Julia, Kotlin, Oberon, Pascal, Rust, Scala and dozens
>> (hundreds?) of other languages disagree with you.
>>
>
> Sorry. Somehow I missed this post. Only realized now from the Skip
> answer.
>
> This is simply not true!
>
> For most of the strongly typed languages (e.g. static typed languages)

Python is a strongly typed language. It checks types at runtime and
does little implicit type conversion. Strong != static.

> in that list -- C, C++, C# and Scala, the ones I know best from that
> list -- require little to no annotations in the code (and certainly no
> new explicit function or class based syntax) in order for static
> analysers to perform their thing, except perhaps on the most exotic
> static analysers.

The languages you cite don't require extra type annotations because
they already have the types in the function signatures. Here's an
example function signature in Scala:

    def addInt( a:Int, b:Int ) : Int

How is that significantly different from a Python function that uses
the proposed annotations?



More information about the Python-list mailing list