grumpy (but light) short takes

Sep 03, 2003 19:04

Attention appliance manufacturers: there are correct and ( Read more... )

sca: aethelmearc, programming, rants

Leave a comment

Comments 12

tangerinpenguin September 3 2003, 16:58:22 UTC
I would like for Java to provide one more publicity level than it does: "internal-public" (or, conversely, "api"). Not all public classes are meant to be used by applications; some are public only because they have to be visible to other classes in your code base.

Assuming that package visibility isn't sufficient, another approach is to define your class as implementing an interface that only contains the API methods, and set things up so that application code is written to the interface rather than the implementation class.

Reply

cellio September 3 2003, 19:19:04 UTC
We've got a number of cases where package visibility isn't sufficient but, possibly, package family would be. For example, if we could restrict something to being visible in com.foo.bar and all of its children (like com.foo.bar.x), but not in com.foo.baz, that would probably solve a lot of our problem cases. Ah well -- in a perfect world...

Writing exclusively to interfaces: interesting idea! Thanks; I hadn't thought of that.

Reply


cortejo September 3 2003, 19:50:50 UTC
"It is my sad duty to report that an SCA participant died at a fighting practice this weekend. We do not yet have permission from the family to release more details. Stay tuned.".

Excuse me?

Reply

cellio September 3 2003, 20:02:26 UTC
Well, that's pure supposition. This seems to be what the kingdom chirurgeon is hinting at. Because she refuses to say anything as direct as this, though, the kingdom mailing list has been flooded with speculation and complaints and arguments over HIPA (a new health-privacy laws) and all sorts of stuff.

Here is the original message on the subject, and here is her followup message. If this is in fact about a death (or serious injury), as it appears to be, there were (IMO) better ways to handle it, ways that would have (probably) eliminated the followup conversation that is now occurring. She posted, ostensibly, to stop rumors; she succeeded in starting them instead. (Hers were the first posts there on the subject. She says people were already discussing it, but they weren't doing so on this list. So she blind-sided people.)

Reply

cortejo September 4 2003, 04:46:05 UTC
Wow, and really what else could it be?

Reply

cellio September 4 2003, 06:41:26 UTC
Yup. And to illustrate the point that the original message stirred up more than it calmed: we wouldn't even be having this conversation if she'd just said what she meant in the first place. That's probably going on all over the kingdom. I feel bad for the family, because when the details eventually emerge they'll be even more in the spotlight than they would have been.

Reply


jducoeur September 4 2003, 15:04:02 UTC
(I understand that .NET has a similar concept.)

More or less. The .NET "internal" keyword basically means that this item is visible within this assembly, which roughly translates to this .dll. The intent is that assembly boundaries more or less correspond to logical library boundaries, so it basically does what you want. (And in fact, I use the keyword mainly for its autodoc effects.)

Reply


Leave a comment

Up