Improving the format of type annotation attributes
Michael Ernst
mernst at cs.washington.edu
Tue Sep 18 12:52:28 PDT 2012
Alex-
Thanks for forwarding this to the mailing list.
> We must make a choice. The low-risk approach is simply to move the
> location information earlier in the type_annotation structure. The
> high-risk approach is to drop the "counted" approach to location
> information and adopt the "nested" location approach.
>
> In either case, the physical content in type_annotations will be hidden by
> the reflection APIs I proposed recently. Annotation consumers will never
> see a location array _or_ a type_location tree. OTOH, it is fairly clear
> that a strongly-typed type_location tree is more "beautiful" than an
> untyped location array. Readability and ease of understanding are as
> important for ClassFile attributes as for Java language features.
>
> Your comments on which approach to take will be most welcome.
I have a slight preference for the "nested" location approach, primarily
for aesthetic reasons and because I believe that those few consumers who
have to deal with it directly will be less likely to make errors. I don't
see any show-stoppers in the "counted" approach, and it might end up being
the only practical way to go forward in the amount of time we have
available.
-Mike
More information about the type-annotations-spec-experts
mailing list