User loginNavigation |
Typed lambda calculii with type-indexed families of functions instead of polymoprhic functions?From by basic understanding, in System F, a polymorphic function is a single value that can be directly applied to an argument. I want to know: is there a formalism where a "polymorphic function" is really a declaration of a family of monomorphic functions, indexed by the types used for instantiation. Thus, two calls to the same [nominal] polymorphic function with different types would resolve to two calls to different monomorphic functions. Clearly this model is more towards the C++ idea of function templates than the FP idea of polymorphic functions. For polymorphic functions with these semantics, it seems that there would be a more clear distinction of what can be resolved at compile-time, using the type information available at instantiation, and what needs run-time dispatch. Perhaps, then, this formalism could also be used as a target language of an optimization that specializes true (System F) polymorphic functions. So, does anyone know any work in this direction? By andhow at 2009-01-12 17:13 | LtU Forum | previous forum topic | next forum topic | other blogs | 4027 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago