Christopher Smith wrote:
No. You could descend the tree to all of Object's children, and you'd
never get to an object that extends from "nil".

Right. I realized that about an hour after I posted.

Let's take C# as an example. Let's say I want to polymophically invoke
"square()". Now, you could try binding to Object, but Object.square()
doesn't exist (unless you add it), so it won't work. In Smalltalk or
with a C++ template, I could just say I want to invoke "square" and I
don't have to specify which base class's method I'm binding to. In fact,
there need not be a common base class for the method at all. *That* is
the difference.

Yeah, OK. Amazing how much more sense it all makes when you're reading it in the morning instead of after a day at work. :-)

limited to "bounded" polymorphism, you're going to have to create some
made up junk type that both Phone and EquityFuture implement,

... which would be an interface. OK.

Again, in Smalltalk there isn't any binding going on. It just does
message dispatch at runtime, with no notion of the message being bound
to a particular type.

Right. I got myself confused. Nevermind. I see what "bounded" and "unbounded" means now.

Yeah, that's what I feared. I could see something like it that would be
100% static though.

There's that, the static overloading, but Ada 95 added "tagged record types", which everyone else calls "classes", and which allow for dynamic dispatch.

dynamic unbounded system, but even so, invocation overhead with a
polymorphic method is non-trivially higher than a non-polymorphic one.

Fair nuff.

dlsym() is that technically C doesn't ensure you can cast void*'s to
function pointers,

Right. That's what allows you to implement C on a machine where code and data live in different address spaces.

but POSIX's definition of dlsym()'s basically requires it.

Ah.

So, no matter what language you *implement* dlsym() in,
it's a C API,and technically you can't be sure you can actually use it
from C. Kind of stupid, but it is what it is.

I see what you're saying. And yes, I was saying "you can't necessarily implement dlsym() in C, because C doesn't guarantee you can cast a void* (or whatever memory you just read the code into) to a function pointer." Two sides of the same coin.

You could write something in SQL that would generate the Firefox binary
though. :-)

Sure. But then you'd need the machine to run it, which would need all kinds of facilities that SQL doesn't supply. But I'm sure you're just pulling my leg here.

--
  Darren New / San Diego, CA, USA (PST)
    It's not feature creep if you put it
    at the end and adjust the release date.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to