2 ms·
"Values in Python are strongly typed, but we pretend they're not. Until, surprise! AttributeError! That thing isn't what you thought it was." Strongly typed?
by pmoriarty 8y ago
"Values in Python are strongly typed, but we pretend they're not. Until, surprise! AttributeError! That thing isn't what you thought it was."
Strongly typed? Maybe you mean statically typed?
From "What To Know Before Debating Type Systems"[1]:
"Probably the most common way type systems are classified is "strong" or "weak." This is unfortunate, since these words have nearly no meaning at all..."
[1] - http://blog.steveklabnik.com/posts/2010-07-17-what-to-know-before-debating-type-systems http://blog.steveklabnik.com/posts/2010-07-17-what-to-know-b...
- sevensor 8y agoNo, I don't mean statically typed. Python is dynamically typed. But it's typed nonetheless, and types in Python matter way more than it appears at first glance. There's no such thing as an untyped value in Python. This is the opposite of C, which is statically typed, but where void* opens the door to doing great and terrible things. I guess you could also call C's type system "surprising", except the surprises aren't cute and annoying like Python's. C's type system is surprising like being defrauded by an accountant is surprising -- everything seems fine for years, and then it all falls apart.