Pillsy wrote:
Pillsy wrote: [...]
This, at least, is a potential problem, but in practice it's never
caused me any difficulty.
*deep sigh*
What?
Every time a serious problem is mentioned, you tend to dismiss it with
little more than a hand-wave.
One thing I've discovered is that the things I think are going to be
problems when I start learning a language (or don't know it at all
yet) end up being pretty different from the things that I actually
learn are problems after working with it for a while.
[...]
I'm sure it does, by 1983 standards.
No, I mean, by 2009 standards. It just looks a little crufty.
[...]
Yet earlier someone was saying you'd omit to specify that Complex
inherited from Number.
I might, but if I wanted it to inherit from Number, I could certainly
choose to have it inherit from Number. I'm just not sure that's the
way to go from a design standpoint, though admittedly I haven't
thought about the question a whole lot..
In truth of fact, in Common Lisp, the built-in COMPLEX class actually
does inherit from the built-in NUMBER class.
[...]
Oh, lovely. Machine-generated code you can't even find and read?
Well, I guess that's one way of describing compilation...? Still, it
strikes me as kind of a perverse one.
It's annoying enough to get bison-generated code to play nice
with version control.
Do you version-control object files and executables? That seems like
strange behavior to me.
[...]
You assume people are using some particular tool, with a fairly decent
interface, that I ain't never heard of. From all indications, a straw
poll here would show most of the other lispers to be using emacs or
something else equally primitive, though, and there might also be issues
with getting such a tool to work with different dialects of Lisp reliably..
The tool I was describing in that paragraph is called... Emacs.
[...]
Fully-qualifying the fuckin' names! What the hell else could I be
referring to?
Oh, no, most of the time, you can just use both packages (i.e.,
namespaces) in the package you're working in without having to fully
qualify anything. If there are clashes, you can specify which package
you want to use for a given unqualified name, and qualify the other
one.
[...]
Let me guess: no MANUAL code generation. Something in the toolchain does
it for you.
Well, like I said, in Lisp we have this thing called a compiler.
Perhaps you've heard of them...?
That's not quite the same thing. And there's no namespace-related stuff
in your code. OK, there was none in mine, either, but you can just slap
a "package foo;" at the top of it.
And I could just slap
(defpackage #:foo

use #:cl))
at the top of mine.
Whereas yours requires you to
defmethod the pre-existing, in some widely used namespace, print-object
method, with who knows what potential risks if you screw it up.
I know what potential risks. The potential risks are that something
could go wrong when you try to print an instance of MY-WHATSIT.
[...]
That was you! It's your own previous post you contradicted up there by
putting explicit subtyping declarations into some of your example code.
Yes, it was. Whether you decide to inherit or not is a matter of
choice.
[...]
Like a C++ vtable, then, except that you (or a bug in your code) can
screw with the vtables for objects from the standard library, the
vtables for MY objects, ...
Well, no. I could muck with the dispatch tables for the generic
functions in the standard library, but unless we're using a bizarrely
crappy and bug-ridded implementation, that won't hurt you any. The
methods you've defined on YOUR-WHATSIT will be invoked on YOUR-
WHATSIT, the methods I've defined on MY-WHATSIT will be invoked on MY-
WHATSIT, and there won't be any interference between the too.
Cheers,
Pillsy