On Sat, 14 Jul 2018 at 05:41, Tim Boudreau <[email protected]> wrote: > I was there when friend APIs were being invented. The *entire* purpose was > for a developer to evolve an API,
Well, fair enough, can't argue with that (although I'd argue there are uses now that aren't for that purpose). Still seems the wrong way around to me in comparison to other things I've worked with. > IMO, there *is no such thing as a "true friend" API.* If you don't want to > publish an API, put all of your code in one module - the compatibility > contract is between that module and itself. If module X depends on module > Y, and nothing else may depend on Y, and X cannot function without Y, then > you have *a single logical module.* You might think it looks nicer carved > up into two pieces, but at that point you're doing code feng shui, not > engineering. There are other reasons for using more than one module where you *never* intend to create a public API, but need other aspects of the module system - optionally loaded parts, OS-specific parts, etc. So I *am* thinking of a small number of things that are logically a unit. > If you have "non-stable dependencies", eventually that is all that will > exist. Nobody would prefer to keep compatibility if they don't have to. Well, that's a pessimistic viewpoint! ;-) But I agree with you that time-limiting instability is probably a good idea. And if optionally installed modules can only be installed against a single release (major/minor not point) of the IDE (and perhaps show a big warning dialog to that fact) I think you'd see things pushed to become stable. > You can. If you're writing an IDE module, your users can't. They just > upgrade the IDE and find something doesn't work anymore, say "this sucks" > and go download Eclipse. I'd argue that the friend system has made that problem worse not better. Assuming in-development API's don't change via automatic updates as opposed to manual upgrade, then I don't see the issue here. With the friend API you either don't have the module in the first place, or a module that's had to hack its way into working in such a way that it's more prone to breakage?! Best wishes, Neil --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
