Re:Python's “Disappointing” Superpowers
by ReflectedImage on Thursday February 02, 2023 @02:24PM
(#34631773)
So Generics, Traits, Abstract subclasses, etc... don't exist in static typing?
As soon as the types get complicated, the code bloat begins.
Re:Python's “Disappointing” Superpowers
by necovek on Saturday February 11, 2023 @04:43PM
(#34756694)
Static typing is not only about declaring your arguments and variables as simple types (int, float, array of ints etc).
It means having a distinct type for any complex structure you pass around (think pre-normalization API params, post-normalization API params, slightly enriched post-processing data as separate type vs a dict of str to anything in Python), or anything you want to make compatible (think interfaces vs duck typing).
Heck, just look at static typing in Python.