I would pay good money for a comparison of type systems, delivered in the vein of Cow Economics. In Self, you have a cow. You ask the cow to moo. It moos. In Java, you have a cow. You construct a CowMooFactory to create an MooIpml. The MooImpl moos. In Python, you have a cow. You ask it to moo. It quacks. In C, you have a pointer to a cow. You ask it to moo. Segmentation fault (core dumped).
In ML, your value moos. It is inferred to be a cow. In Ruby, your value moos. Could be a cow; might be a MooDuck. Do you really care?
Type Systems Explained with Examples
31–34 of 34 posts
Re: Type Systems Explained with Examples
#32If anyone is interested in Type systems and what's a type, I highly recommend watching the first 20 mins of Sean Parent's presentation: https://youtu.be/sWgDk-o-6ZE It will change the way you think about types after this.
Re: Type Systems Explained with Examples
#33If anyone is interested in Type systems and what's a type, I highly recommend watching the first 20 mins of Sean Parent's presentation: https://youtu.be/sWgDk-o-6ZE It will change the way you think about types after this.
The entire talk is about memory layouts and how nothing has a meaning unless we ascribe a meaning to it.
I don't really know what this has to do with types, or type systems, which are an algebraic concern, as far as I'm concerned.
Re: Type Systems Explained with Examples
#34Earlier quoted context omitted.
Didn't think Python had duck typing...
What do you think "duck typing" is? Historically, it feels like I've mostly heard the term applied to Python. Edited to add: Please don't take my question as rhetorical attack - it was intended as inquiry. There may be different definitions floating around.