This is one of those things like a trick picture where you can’t see it until you do, and then you can’t unsee it.
I started with C/C++ so typing was static, and I never thought about it too much. Then when I started with Python I loved the dynamic typing, until it started to cause problems and typing hints weren’t a thing back then. Now it’s one of my largest annoyances with Python.
A similar one is None type, seems like a great idea, until it’s not, Rust solution is much, much better. Similar for error handling, although I feel less strongly about this one.
Coming from a background where all the datatypes are fixed and static (C, PLCs) it took me so very long to get used to python’s willy nilly variables where everything just kinda goes, until it doesn’t. Then it breaks, but would’ve been fine if we just damn knew what these variables where
It was a typo, but I also wanted to add that type coercion is not dynamic typing, the coercion can be done statically during compile time, so it could not be the 2nd one, even if it wasn’t a typo
Dynamic typing sucks.
Type corrosion is fine, structural typing is fine, but the compiler should be able to tell if types are compatible at compile time.
This is one of those things like a trick picture where you can’t see it until you do, and then you can’t unsee it.
I started with C/C++ so typing was static, and I never thought about it too much. Then when I started with Python I loved the dynamic typing, until it started to cause problems and typing hints weren’t a thing back then. Now it’s one of my largest annoyances with Python.
A similar one is None type, seems like a great idea, until it’s not, Rust solution is much, much better. Similar for error handling, although I feel less strongly about this one.
Coming from a background where all the datatypes are fixed and static (C, PLCs) it took me so very long to get used to python’s willy nilly variables where everything just kinda goes, until it doesn’t. Then it breaks, but would’ve been fine if we just damn knew what these variables where
Now my brain just goes “it’s all just strings”
Dynamic typing does kinda smell like primitive obsession, now that you’ve brought it to my attention lol
Do you mean type coercion?
Dyac
From my perspective, dynamic typing IS type corrosion!
Type coercion = Allow types to be converted to other types automatically to perform some operations like comparison.
Type corrosion = some non-standard condescending term to say that dynamic typing has no proper rigid types?
It was a typo, but I also wanted to add that type coercion is not dynamic typing, the coercion can be done statically during compile time, so it could not be the 2nd one, even if it wasn’t a typo
It was obviously a typo
YESSSSSSSSSSSSS. You are so valid for this. Static typing is so so so so so useful.