5 ms·
That's an interesting perspective. It probably does have a lot to do with the first programming languages you learn. The first programming languages I learned w
by trealira 3y ago
That's an interesting perspective. It probably does have a lot to do with the first programming languages you learn. The first programming languages I learned were all strongly typed, so it seemed inherent to the concept of a variable when I learned it. I had to wrap my head around dynamically typed languages as "Ah, all variables are actually just pointers to structures with a tag indicating the type, and they can be rebound to objects with different types." When I write Python, I use type annotations, or I keep track of the type in my head, and use casts as convenient conversion functions. But, since Awk and shell script don't make you cast things explicitly as much as Python, I can also see how someone would learn programming with dynamic types in a really natural way.