Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
6875396 | Theoretical Computer Science | 2018 | 16 Pages |
Abstract
Generalized algebraic datatypes (GADTs) are a hot topic in the functional programming community. Previously we showed that object-oriented languages such as C⯠and Java can express GADT declarations using Generics, but only some GADT programs. The addition of equational constraints on type parameters recovers expressivity. We now study this expressivity gap in more depth by extending an earlier translation from System F to C⯠to handle GADTs. Our efforts reveal some surprising limitations of Generics and provide further justification for equational constraints.
Keywords
Related Topics
Physical Sciences and Engineering
Computer Science
Computational Theory and Mathematics
Authors
Andrew J. Kennedy, Claudio V. Russo,