4 ms·
You seem to contradict yourself. > With a static language we can determine the type of every expression at compile time, which requires full knowledge of the w
by weberc2 9y ago
You seem to contradict yourself.
> With a static language we can determine the type of every expression at compile time, which requires full knowledge of the whole program.
> Dynamic and static languages are fundamentally different. There is no more or less.
For many Python programs, every expression can be determined statically. While this may not be true for all expressions in all programs, surely this means the OP's claim that "Python is becoming more statically typed" is true and your claim that "There is no more or less" is false, no?
Besides, there are languages like Go which have dynamic types (interface{}) and which are considered statically typed languages. You might say that the static type is interface{}, but then you could say that every type in an un-annotated Python program is also interface{} (or whatever the equivalent Python type would be).
It seems like your arguments hinge on semantic games.
- coldtea 9y ago>Besides, there are languages like Go which have dynamic types (interface{}) and which are considered statically typed languages. And C# has a var type (dynamic) and Dart has gradual typing.
- jakear 9y agovar is type inference, not dynamic typing. Unless something has changed since I last C#’d. The docs seem to say this still holds: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
- coldtea 9y agoI meant this variable declaration: C# Dynamic Type: C# 4.0 (.NET 4.5) introduced a new type that avoids compile time type checking. You have learned about the implicitly typed variable- var in the previous section where the compiler assigns a specific type based on the value of the expression. ... A dynamic type can be defined using the dynamic keyword.Jan 1, 2014
- catnaroek 9y agoDart merely has optional typing, not gradual typing.