Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [albireo-dev] thoughts on API

Todd,

Although the language in my previous message may not have been clear, I agree completely. I have to admit that the SAS contribution does not demonstrate a good level of openness, but that is mainly because I never had the time or the need to think carefully about a proper API. And that was really my main point. We just need to be careful and precise about what is and is not API so that the API doesn't become a support burden in the future.

So, I have no objection to experimental use of the "internal" part of the code, and there's no need to lock down by overusing final and private/package scope.

(And thanks for the link. I'm interested to see what WTP decides.)

Todd Williams wrote:
All,

I agree. We'll need to think about it carefully though. If we allow
subclassing, then there is a much larger burden to ensure future
compatibility. There's a reason that SWT discourages subclassing of most
widgets.

Please note that SWT only discourages subclassing, but falls short of
preventing it.  I've always been of the school of thought that you can never
predict all the future cases in which your software will be used.  As a
result, I'd favor an approach that allows subclassing and easy access to all
implementation details by subclasses (ie. exceedingly limited use of 'final'
or 'private' modifier in the implementation).

Over the years, we've run into cases in various frameworks in Eclipse across
multiple projects where the developer locked the abstractions down so tight
that the abstraction flexibility was almost completely removed.  We need to
admit that we simply can't know everything about how software will be
reused.  And, it should be the adoptor that determines what level of risk is
appropriate for him to take when subclassing the code to add new
functionality.  That risk will include that his unanticipated style of reuse
may break in subsequent releases.

So, I agree that discouraging and warning is appropriate where there are
known dangers, but in the end, if an adoptor wants to "play with matches",
he should be able to knowingly take the risk and do so.

For the hopelessly bored, I have a much longer post on an overlapping topic
to this in Bugzilla in response to some proposed changes to WTP's package
visibility: https://bugs.eclipse.org/bugs/show_bug.cgi?id=202711#c2

Regards,
Todd



_______________________________________________
albireo-dev mailing list
albireo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/albireo-dev



Back to the top