CLEAN: A language for functional graph rewriting
Proc. of a conference on Functional programming languages and computer architecture
LFP '90 Proceedings of the 1990 ACM conference on LISP and functional programming
Functional Programming and Parallel Graph Rewriting
Functional Programming and Parallel Graph Rewriting
A lightweight implementation of generics and dynamics
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
PARLE '91 Proceedings of Parallel Architectures and Languages - Volume II
Generic Programming within Dependently Typed Programming
Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming
A Generic Programming Extension for Clean
IFL '02 Selected Papers from the 13th International Workshop on Implementation of Functional Languages
Polytypic Values Possess Polykinded Types
MPC '00 Proceedings of the 5th International Conference on Mathematics of Program Construction
Lazy dynamic input/output in the lazy functional language clean
IFL'02 Proceedings of the 14th international conference on Implementation of functional languages
Towards a strongly typed functional operating system
IFL'02 Proceedings of the 14th international conference on Implementation of functional languages
IFL'02 Proceedings of the 14th international conference on Implementation of functional languages
Dynamic construction of generic functions
IFL'04 Proceedings of the 16th international conference on Implementation and Application of Functional Languages
Hi-index | 0.00 |
Dynamic types allow strongly typed programs to link in external code at run-time in a type safe way. Generic programming allows programmers to write code schemes that can be specialized at compile-time to arguments of arbitrary type. Both techniques have been investigated and incorporated in the pure functional programming language Clean. Because generic functions work on all types and values, they are the perfect tool when manipulating dynamic values. But generics rely on compile-time specialization, whereas dynamics rely on run-time type checking and linking. This seems to be a fundamental contradiction. In this paper we show that the contradiction does not exist. From any generic function we derive a function that works on dynamics, and that can be parameterized with a dynamic type representation. Programs that use this technique combine the best of both worlds: they have concise universal code that can be applied to any dynamic value regardless of its origin. This technique is important for application domains such as type-safe mobile code and plug-in architectures.