[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: More on dispatching by function return type
On Wednesday, December 17, 2003 12:19 PM, John Clements
[SMTP:clements@brinckerhoff.org] wrote:
> The problem here is one of locality: how far away in the program do
> I have to look in order to understand what's happening in my little
> corner of it?
On average? About as far as you would have to look to see what
function is getting applied to the elements of a list in "map".
> In languages like ML, Scheme, etc. etc. etc., I can figure out what
> a function call will do, knowing only the inputs and the code of the
> call itself (plus all that icky mutable state).
Well sure, if you know "the code of the call itself" (I presume that
means the body of the function, right?). Statically determining that
isn't a trivial problem. On the other hand, Haskell *can* statically
tell me which "read" is getting invoked or if it doesn't yet know.