Linked by Thom Holwerda on Mon 14th Jan 2013 23:15 UTC, submitted by MOS6510
General Development "Programming languages are living phenomena: They're born, the lucky ones that don't die in infancy live sometimes long, fruitful lives, and then inevitably enter a period of decline. Unlike real life, the decline can last many, many years as the presence of large legacy codebases means practiced hands must tend the code for decades. The more popular the language once was, the longer this period of decline will be."
Permalink for comment 549291
To read all comments associated with this story, please click here.
RE[12]: Comment by RareBreed
by ndrw on Fri 18th Jan 2013 17:01 UTC in reply to "RE[11]: Comment by RareBreed"
ndrw
Member since:
2009-06-30

Then why does the second page of what you linked explicitly say it's not weak typing?


Easy enough to check:
"Weak typing is not really a fair description of what's going on in Python."

Which is fair given that Python uses types for implementation reuse and error reporting. This of course doesn't stop me from adding a method "bark()" to an existing class "cat".

Why does Wikipedia's page say Python is strongly typed?


It also says that Lisp is strongly typed (a language specifically designed for making all non-primitive values untyped). The reason they give is that it doesn't do type coercion, which is IMHO a stupid way of defining "strong typing". But I will accept that, so if you wish, we may end the discussion here.

How would most type systems fail to classify a cat properly?

data FurType = Short | Long | Medium
data Color = Black | Orange | White | Tabby | ...
data Cat = Cat { hungry :: Bool, fur :: FurType, color :: Color, ... }

mycat = Cat True Short Black ...


Interesting (really!). But note that Haskell's type system is definitely not what people would call "most type systems".

And even Haskell can't make a "cat" object sometimes hungry, sometimes not. (True, this goes deeper than the type system in Haskell).

Reply Parent Score: 2