| Vincent Foley-Bourgon ( @ 2005-05-24 08:14:00 |
Ruby's typing model vs Haskell, ML
I was skimming over A Gentle Introduction to Haskell, and the first chapter is all about the static typing in Haskell, how a function can have a a->b type signature, etc. This whole typing system is called the Hindley-Milner type system, and it's quite a complex beast, I remember from my O'Caml days.
And as I was reading this, I realized why Ruby was so fun; when it comes to typing, Ruby doesn't even use complex words, the rule is "If it walks like a duck and quacks like a duck, it's probably a duck." How simple and cute is that? Let's all hug Ruby!
I was skimming over A Gentle Introduction to Haskell, and the first chapter is all about the static typing in Haskell, how a function can have a a->b type signature, etc. This whole typing system is called the Hindley-Milner type system, and it's quite a complex beast, I remember from my O'Caml days.
And as I was reading this, I realized why Ruby was so fun; when it comes to typing, Ruby doesn't even use complex words, the rule is "If it walks like a duck and quacks like a duck, it's probably a duck." How simple and cute is that? Let's all hug Ruby!