Ian Kelly wrote: > On Wed, Jan 28, 2015 at 8:04 AM, Mario Figueiredo <mar...@gmail.com> > wrote: >> In article <54c83ab4$0$12982$c3e8da3$54964...@news.astraweb.com>, >> steve+comp.lang.pyt...@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?
Ian, that's obvious. Just open your eyes: Scala def addInt( a:Int, b:Int ) : Int Python def addInt( a:int, b:int ) -> int: They're COMPLETELY different. In Scala they are *type declarations*, not annotations. We're talking about annotations, not declarations. They're as different as cheese and a very slightly different cheese. Do try to keep up. *wink* -- Steven -- https://mail.python.org/mailman/listinfo/python-list