Alessio said:
So now you're disagreeing with *yourself*? Well, I guess you might
sometimes change your mind about one of these things, but still, the
timing in this case was atrocious!
The earlier post WAS correct.
But it wasn't. Or else the later one wasn't correct. You can't have it
both ways! Either they all go into one name-resolution pool or they
don't; they can't both do so and not do so at the same time.
So, the earlier post WAS incorrect.
The meaning of a symbol is apparent from the context. Yet there is a
single namespace, the package.
Not consistent. Either the former or the latter is false. I think you
have package and namespace confused, and the package actually has a
separate namespace in it for each of several kinds of thing. In other
words, it doesn't just have symbols, it has methods separate from
variables separate from classes etc.; it has some notion of which of
these is which and keeps them tidy.
there are multiple namespaces here (one for
variables, one for classes, one for functions and macros, ...)
An admission of the truth at last?
I don't think it can cause any problem whatsoever.
By "problems" in this instance I meant scoping headaches for the
programmer, rather than actual failures of the code.
What parameter name? All I see is a list of arguments. A
transaction-manager and a picture-library might conceivably both be
arguments to the same call.
Others have explained it to you already. [more condescension in this vein]
How rude.
If I use the "private" symbol P::X, this means that anything named
P::X is private: the CLASS P::X, the VARIABLE P::X, the FUNCTION P::X.
Oh God, it just gets worse and worse! Now you say your system's bollixed
up enough that you can't even have, say, a private variable named foo
and a public method named foo in the same place? Who thought this up?
Why would you make private apply to everything of the same NAME,
regardless of whether that name was overloaded? Why?
Oh, nevermind. It's wacky, you like it anyway, I don't, and that's the
end of the matter. There's really little point in continuing this.
How is this "much ****ing coarser" than Java?
It's spelled "****". With an F.
Sure, I can't have function X private and class X public.
Let's tick things off shall we? One. More. Time.
1. Your module size is like in C, a few per program (plus libraries'),
rather than like Java or even C++, one per class.
Imagine C++ only with "private" visible to everything in the same
.cc file, or all pairs of classes in a single source file implicitly
mutual "friends".
2. The encapsulation is extremely weak even so. Not only can you
circumvent it by adding a single colon to a scope operator somewhere,
a) it's right next to another colon, so an easy typo to make simply
by bouncing a key; b) you can presumably automate even the one lousy
extra colon using a macro; and c) it will look enough like normal to
be easily overlooked and mistaken for innocent code, unlike, say,
Java reflection and setAccessible(true) calls. Heck you can even get
your Java IDE to find all setAccessible calls on reflection API
objects without false positives and throughout the code base, if your
IDE is decent enough. Meanwhile :: is a search that will have false
positives I guarantee it. All two-or-less-character searches do.
Besides that, what can you express in Java that you cannot in Common
Lisp?? (apart from the fact CL has no "protected")?
Technically nothing since they're both Turing complete. But much that is
decent and good in Java would require implementing a Java emulator in CL
to get in CL. (The JVM spec is readily available, so this should be
trivial right?)
Class-granular "private" comes to mind in particular.
Should be obvious to most people. Can't be bothered to try to explain
it, given that.
There are no symbol collisions in CL's standard. There are maybe a few
Always the one-upmanship with you, isn't it?
This isn't about me, it's about the code. Please leave your personal
criticisms of me at the door and focus on the actual topic here. Thank you.
CL IS NOT JAVA and IT WORKS DIFFERENTLY.
Exactly my point. It works differently, and in this case, differently =
worse. Now every unrelated pair of "close" methods collides, unless you
start being creative with your thesaurus, and then code gets less
readable and there's more and harder memorization to learn to use the
darn thing.
close(file), close(socket), close(string-output-stream) BELONG ALL TO
THE SAME GENERIC FUNCTION
The one for iostreams.
What about closing windows? Oops, no windows, forgot.

Well, I'll
think of *something*...
No you're not, not one damn bit.
I really don't know how to explain it to you, yet it seems simple to
me.
I'm sure the guys down at Bellevue that think they're Napoleon think the
same thing when they try to get people to believe them.
And we can always use more criticism of emacs. Right, guys?
So while I can drawRect() and drawCircle(), I can't drawChart() but I
have to use a workaround, Chart.drawOn(graphics).
That's not a workaround. We can also have Circle.drawOn, Rect.drawOn,
etc. if we want to be able to do them all consistently. Or we can add a
generic draw() to Graphics2D that takes a Drawable and just calls
argument.drawOn(this). (Assuming we control Graphics2D.) Then you can
happily do graphics.draw(chart).
I need ALL objects that can be drawed implement the Drawable
interface. Unfortunately it's unlikely I'll ever have control on ALL
classes that can be drawed...
Why? You're the one designing the system, hypothetically.
So I end up having "primitive" drawXXX on Graphics,
com.mypackage.Drawable.drawOn(Graphics),
com.yourpackage.DrawableObject.draw(Graphics), and so on.
Why? The system's designed would make Drawable public, and an interface
so any class could implement it regardless of constraints on its superclass.
Instead in
Lisp I can have
(draw object graphics) and stop - if I want to draw a new kind of
object, I'll write the appropriate method for the draw generic
function.
The cost of having this is that you can change someone else's code, and
even are encouraged to. If they didn't make their class Drawable, why,
you'll just do it for them!
If someone did that to one of my Java classes, it would annoy me. Hello,
compatibility headaches, now there's more than one incompatible version
out there.
[some quoted material dropped that wasn't replied to -- please trim
more, your posts are very long and slow to load]
In Java I really put MY method in the dispatch table of YOUR
superclass.
Not explicitly! And not really at all; the classloader builds up a
dispatch table at runtime.
This is the analogy I'm making.
And I'm telling you, it doesn't quite work.
Adding a subclass in Java that overrides the method IS
EXACTLY LIKE adding a method in Lisp specialized on the subclass. It's
the very same thing.
NO, IT ISN'T! If you still don't understand why I'm afraid you never
will. It's time to drop this line of debate.
imho my comparison is more correct than yours.
I once knew a guy who was of the opinion that the earth was flat.
#: is read syntax that makes the symbol not being interned in any
package.
"Read syntax"?
Can't your register custom protocol handlers? If you can't, then Java
really sucks!
Of course you can, but since they don't come with the standard library,
you need to either reinvent them or dredge one up somewhere. And then
the licensing fun begins. Even with open source, there's various
sometimes-incompatible licenses. There are even pairs of licenses in the
FSF's own GPL family of licenses that can't be used together. Sometimes
there are attribution clauses, and those create scaling problems.
(Consider that work is typically built on previous work. Suppose a work
always built on three earlier works, except for first-generation works,
and acknowledgement was required. First generaton works have 0
attributions. Second tend to have 3. Third, 3x3 + 3 = 12. Fourth, 12x3 +
3 = 39. Fourth, 120. Fifth, 363. Sixth, 1095. Whoa, over a thousand
already! The credits list is gonna be as long as at the end of Revenge
of the Sith on those sixth-generation works... The exact numbers don't
matter, just that whatever they are they'll increase exponentially.)
Oh, nice.
