Re: macros
Thomas A. Russ wrote:
Series Expansion <serexp1@gmail.com> writes:
I just explained why the package system won't. Adding new classes in
their own packages? No problem, the package system can distinguish
foo.String from bar.String. Adding new methods to an existing class,
say foo.String? Uh-oh. Is that baz's foo.String.doIt() or quux's
foo.String.doIt()? They have the same method name, are methods of
classes with the same name, and the classes are in the same package.
As far as the compiler is concerned, they are the same. The package
system cannot distinguish them unless we add another layer of
namespacing, this time INSIDE classes, and have foo.String.baz.doIt()
and foo.String.quux.doIt() instead of just foo.String.doIt() as the
fully-qualified names. And now we're deep in migraine-headache
territory, without oar or compass...
Well, the above paragraph is prima facie evidence that you have a
profound ignorance of how the Lisp package system works. You also have
a profound ignorance of how the Lisp object system works. And taken
together, those sources of ignorance lead you to raise objections that
are absolutely incorrect.
First of all, methods don't belong to classes. Period.
Second of all, classes don't establish any sort of namepsace. Period.
I will take your word for it.
The only way in Lisp for you to have "classes of the same name" is for
them to be exactly the same class, as in EQ classes. To put this into
Java terms for you, the confusion you are imagining would be akin to
saying that one could have two classses java.lang.String and
java.lang.String which are different, and thus confusable. You can't,
since they are the same classes.
Technically two classes with same name including package are
considered different in Java if they are loaded by different
classloaders.
Not that it really matters for your argumentation - it is still
perfectly valid.
Arne