The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Constructors are types in vallang, but for no good use. Perhaps this was a unification step too far in 2007/2008. In Rascal constructors are not used as types. Constructor functions are used as functions, and they have a function type, and constructors are used to create constructor trees of the algebraic datatype they belong to.
So the proposal is to remove this feature entirely:
From the interpreter, throwing errors when it is used (not implemented)
From the syntax definition of Rascal itself
From vallang by changing class ConstructorType extends Type to class Constructor.
The final step would also align vallang semantics with the semantics of the Type and ParseTree standard library modules.
Describe the bug
and
Constructors are types in
vallang
, but for no good use. Perhaps this was a unification step too far in 2007/2008. In Rascal constructors are not used as types. Constructor functions are used as functions, and they have a function type, and constructors are used to create constructor trees of the algebraic datatype they belong to.So the proposal is to remove this feature entirely:
class ConstructorType extends Type
toclass Constructor
.Type
andParseTree
standard library modules.