|
Authored by: BitOBear on Sunday, May 06 2012 @ 04:55 PM EDT |
Where did the word "manifest" come from?
If you are -skilled- as a shipping and receiving clerk and you receive a box
full of broken masonry (bricks etc) and the manifest for the box says "high
end televisions, qty 12" you are probably going to raise the alarm.
If you are a -really- skilled shipping clerk and you get a box with a manifest
that says "iPad Touch, qty 10" and find eleven in the box you are
going to raise the alarm as well.
Having expectations of a box and procedures for handling a properly packed box,
and procedures for handling an improperly packed box, do not imbue the box
itself, nor its contents, with the power of self awareness nor polymorphism.
The White House doesn't speak, even if journalists say things like like
"the White House said today...". Common mis-attribution of feature or
action doesn't make the mis-attribution correct for being common.
A jar file is a zip file of a directory tree with an additional file in it
called Manefest and its name changed from whatever.zip to whatever.jar to
indicate that fact. There are rules for what a .jar file must and must not
contain. There are rules for how java will treat a .jar file. None of those
things have anything to do with the code in each or any of the .class files that
might be in the .jar file.
Being a member of a package is like being a member of a club. The world may have
expectations of you because of the name of your club, but you and you alone
adopt or eschew those expectations. The environment may treat members of
"Motorcycle Club" different than members of "Benevolent
Society" but that is a feature of the world not the club. (As much of a
stretch as that may seem to be, its true.)
There -are- languages where "class" and "package" are the
same thing. Perl is such a language. Ada is another kind of. This is a side
effect of the fact that classes are containers and some language designers
didn't want two container thingies because they didn't need separate "boxes
that imbue" -and- "boxes that control access". (e.g. perl doesn't
have "protected" things).
Classes are structures (in C++ the words class and struct are interchangeable at
essentially every level) that do the things that structures do, to be made part
of the class is to become part of the structure. This is like welding I-beams
and trusses together to make a steel floor.
Packages are like boxes. One does not "become part of" the box in a
way that changes the nature of the box, nor is one changed by becoming part of
the box, one is simply placed within the box.
That's why there are two separate words for the thing in Java because the
needed/wanted both kinds of things.
[ Reply to This | Parent | # ]
|
- Even so... - Authored by: Anonymous on Sunday, May 06 2012 @ 06:47 PM EDT
|
|
|
|