Re: [q-lang-users] H/M-based typing for Q
Brought to you by:
agraef
From: John C. <co...@cc...> - 2006-11-30 21:57:53
|
Albert Graef scripsit: > Yes. In fact standard H/M allows you to infer *all* types in a program, > automatically, *without* any explicit typing information (except in some > rare corner cases). Of course this becomes more difficult if you want to > support ad-hoc polymorphism (like a function or constructor which takes > either an integer or a list as an argument, which isn't possible with > standard H/M, but is a no-brainer in Q). I would never want to see Q put into the Hindley-Milner straitjacket. H/M type inference makes sense if you are going to do static typing anyway, but things like monomorphic lists are IMHO completely against the spirit of Q. -- Income tax, if I may be pardoned for saying so, John Cowan is a tax on income. --Lord Macnaghten (1901) co...@cc... |