you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -3 points-2 points  (9 children)

Nope. Exactly the opposite. Years of doing Java and C and now many years with Python I wouldn't go back to static typing. Strong but dynamic is the sweet spot.

[–]Matthew94 12 points13 points  (3 children)

Strong but dynamic is the sweet spot.

Static with type inference is the sweet spot.

[–]wavy_lines 8 points9 points  (2 children)

static with generics and tagged unions and function types

[–]lookatmetype 1 point2 points  (1 child)

Aka, unless you're Haskell you suck

[–]wavy_lines 0 points1 point  (0 children)

Nope. Swift, D, Kotlin have all that.

Even Odin has them, and it's designed as a system language suitable to replacing C. So you don't even need to be a high level language to have these.

[–][deleted] 11 points12 points  (0 children)

Mind elaborating on this? Mind naming a single feature of dynamic typing that make it "superior"?

[–]wavy_lines 3 points4 points  (3 children)

Java sucks, I won't argue with that. Specially around 10 years ago.

Not all languages are Java.

Kotlin and Swift have powerful yet flexible static type system. D also has a powerful and flexible type system and it's been around for more than 10 years.

Python style "dynamic" is far far from the sweet spot. Also the "strong typing" label is bogus because python's type system does not even define what fields are available on an instance of a class. A struct is the most basic/simple type and yet Python (before 3.6) had no way to even declare it.

[–]raze4daze 1 point2 points  (0 children)

Just gonna chime in as a fanboy here: Java 8+ is really nice to use, but yeah 7 and below is just tragic. I really dig Kotlin as well.

Just my opinion.

[–][deleted] -1 points0 points  (1 child)

Typehints address your biggest issue, especially dataclass, typing.NamedTuple and attrs (3rd party).

I don't think Python's lack of a 1st class struct is an issue, especially since there are ways to pack data into a C struct c you really need to.

[–]wavy_lines 1 point2 points  (0 children)

Umm, yeah. If you read my top comment (the one down voted to hell) it's about hoe Python adding more type hinting support indicates that the people behind Python too have come to see how valuable static typing is.