You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syntaxExpression
= ...
| reifiedType : "type""(" Expression symbol "," Expression definitions ")"
...
| reifyType : "#" Type type !>> "[" !selector
The enhancement proposal is to:
change their name in the syntax definition
fix all impacted source code in Rascal and Java downstream
also rename the operators in the documentation
We might start by only the documentation, but eventually we should fix the implementation names as well.
The renaming:
syntaxExpression
= ...
| typeValue : "type""(" Expression symbol "," Expression definitions ")"
...
| typeLiteral : "#" Type type !>> "[" !selector
and corresponding changes in the definition of Pattern.
The rationale is clear in itself:
type(Symbol,map[...]) is indeed a value representation of all Rascal types based on Symbol and Production, completely dynamic and so the static type is type[value]
and #Type is a special literal type version of the above, where the user gets the Symbol value representation for free and the type can be statically asserted to be as concrete as type[Type] for every #Type.
The text was updated successfully, but these errors were encountered:
IOW, the word "reify" does not carry as much meaning as one might expect ;-) "value" and "type" and "types as values" makes more sense IMHO. @PaulKlint@tvdstorm wdyt?
Describe the bug
These two expression operators are confusing and their (static) semantics is sometimes unclear:
# Type
type(Symbol symbol,map[Symbol,Production] definitions)
This is their grammar rules in Rascal.rsc:
The enhancement proposal is to:
We might start by only the documentation, but eventually we should fix the implementation names as well.
The renaming:
and corresponding changes in the definition of
Pattern
.The rationale is clear in itself:
type(Symbol,map[...])
is indeed a value representation of all Rascal types based onSymbol
andProduction
, completely dynamic and so the static type istype[value]
#Type
is a special literal type version of the above, where the user gets theSymbol
value representation for free and the type can be statically asserted to be as concrete astype[Type]
for every#Type
.The text was updated successfully, but these errors were encountered: