Re: [q-lang-users] H/M-based typing for Q
Brought to you by:
agraef
From: Andrew B. <an...@vo...> - 2006-12-02 00:23:16
|
Perhaps a word of clarification: >> My intuition about this is that most of the code that gets written >> is monomorphic. (Is that a word?) =20 > (It is.) Aah, good. The little bit of Latin I've figured out is not completely = useless. > The trouble is not so much with monomorphic variables as with = monomorphic > collections. ML, for example, insists on having monomorphic lists so > that when you remove an object from a list you know its type. That is > very annoying. My point was not that this is good, but rather that the larger majority = of functions only ever get one type passed to them, or in the Q = parlance, the majority of expressions use the same types from evaluation = to evaluation. Going back to my initial statement, my (probably = provably incorrect) belief, based on an incomplete understanding of the = problem space, is that it is possible to automatically determine the = types in these cases, and not require the programmer to spell out all = that extra noise. In the cases where the programmer does something = polymorphic, then the compiler's task gets a bit harder, and perhaps it = will have to emit a different reduction for each input type or = something. In the cases where the programmer is doing something = complicated with delayed execution, it is not hard to imagine that the = compiler would have to fall all the way back to calling an interpreter = in the run-time library. =20 -andrew |