Change representation of retains
annotation?
#22842
Labels
area:annotations
area:experimental:cc
Capture checking related
itype:language enhancement
itype:question
stat:needs decision
Some aspects of this issue need a decision from the maintainance team.
The current definition of the internal
@retains
annotation is this one:I wonder whether it would not be better to define it differently:
Here,
C
would be a type representing a capture set. Since we don't have sets in Tasty, we can represent it as a union type. For instance,would be represented as
In other words, it's exactly the representation we use for capture sets, but as a union type.
Advantages:
@retains
-annotated types because trees use identity hash codes.Downsides:
The text was updated successfully, but these errors were encountered: