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 | 4072 reads
|
Browse archives
Active forum topics |
Recent comments
32 weeks 6 days ago
33 weeks 1 hour ago
33 weeks 1 hour ago
1 year 3 weeks ago
1 year 7 weeks ago
1 year 8 weeks ago
1 year 8 weeks ago
1 year 11 weeks ago
1 year 16 weeks ago
1 year 16 weeks ago