Michael Diehr wrote:
That's because Object doesn't have an Operator_Compare.
Keep in mind that comparisons are compiled at, er, compile time. So,
for a comparison operator to be invoked, it must be something the
compiler can know about at that time -- i.e., something defined on the
static type of the object references involved.
Ok, but then how/why does Operator_Convert work? Wouldn't the same
issue hold?
No. Comparisons and conversions are two very different things. (And
Variants are weird beasts in any case; they have a lot of special cases
that don't apply to objects in general.
If it's magic compiler pixie dust -- I wonder if we could get that magic
applied to Operator_Compare() for Variants?
In principle, we probably could in that case, but I'm not sure I'd be in
favor of it -- variants are slow enough already.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|