No doubt! But someone who was describing his or her fondness for Haskell's type system---the person I was initially responding to---probably does.
I'm familiar (though not intimately familiar) with the idea of dictionary passing and with the fact that type classes are implemented that way. I'm not sure what the point of the remark in the present context is, though. I gather that you aren't a fan of the compiler doing this for you. (I'm not precisely sure what you mean by first-class type objects here, given the mention of Data.Typeable; concretely, I'm aware of three monad libraries that offer something like a polymorphic return and I know how two of them do it; one with symbol macros and regular old maps, and one that (in the presently released version) uses a run-monad function that threads through a regular old map. You presumably are thinking of something else; if so, I'd be glad to know what it is.)
> There is no reason that a user-level macro can't add enough inference to perform polymorphic returns.
Well, if you say so. I can't quite picture how this would work as a macro, but I'm not going to deny it can be done on that ground.
FWIW, regarding your last sentence, I find the idea of a program separate from a particular type system kind of hard to grasp.
No doubt! But someone who was describing his or her fondness for Haskell's type system---the person I was initially responding to---probably does.
I'm familiar (though not intimately familiar) with the idea of dictionary passing and with the fact that type classes are implemented that way. I'm not sure what the point of the remark in the present context is, though. I gather that you aren't a fan of the compiler doing this for you. (I'm not precisely sure what you mean by first-class type objects here, given the mention of Data.Typeable; concretely, I'm aware of three monad libraries that offer something like a polymorphic return and I know how two of them do it; one with symbol macros and regular old maps, and one that (in the presently released version) uses a run-monad function that threads through a regular old map. You presumably are thinking of something else; if so, I'd be glad to know what it is.)
> There is no reason that a user-level macro can't add enough inference to perform polymorphic returns.
Well, if you say so. I can't quite picture how this would work as a macro, but I'm not going to deny it can be done on that ground.
FWIW, regarding your last sentence, I find the idea of a program separate from a particular type system kind of hard to grasp.