[API Design] Link<?> generic signature #1853
stefanseifert
started this conversation in
Ideas
Replies: 1 comment
-
I think we can drop the generic support, it hasn't proved useful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i currently see no benefit with the concept of having a generic signature like
Link<Page>
orLink<Asset>
. in theory it makes sense, in practice not.whenever you consume a link object from link handler or from an model interface, you have no idea on what item the link really points to when you declare your variable, and you can only use
Link<?>
orLink
. same applies in model interfaces that return links. you only know what's in it after you actually got the link instance. this makes using link objects very clumsy, and you already see code scattered with @SuppressWarnings("rawtypes") to get rid of related warnings.the only place where you are sure what the link is pointing at is during link building/handling, but this piece of code is inside the link handling and not relevant for the users of the API.
i would propose to drop this generic concept completely.
this discussion is taken over from the mailing list where it did not gather any attention (except from @ky940819).
Beta Was this translation helpful? Give feedback.
All reactions