|
|
|
|
|
by velis_vel
4559 days ago
|
|
I don't know much about Lisp, but the reason people say this about Haskell isn't just that it has a type system, but a powerful one. For example, how would you type the cons function? In Haskell, it has type t -> [t] -> [t] (i.e., for all types t, given a value of type t and a value of type list of t it produces a value of type list of t). In Lisp, on the other hand, you can construct a cons cell out of any two objects. Obviously you can certainly construct a type system in which you can handle Lisp cons cells reasonably; Hindley-Milner type systems aren't the only game in town. But I don't think it'd have the 'if it compiles it probably works' property any more. |
|