[squeak-dev] Message>>#= & Message>>#hash
Eliot Miranda
eliot.miranda at gmail.com
Tue Nov 20 00:16:51 UTC 2018
Hi David,
On Mon, Nov 19, 2018 at 9:52 AM David T. Lewis <lewis at mail.msen.com> wrote:
> On Mon, Nov 19, 2018 at 09:32:17AM -0800, Eliot Miranda wrote:
> > Hi All,
> >
> > In VisualWorks Message implements #= & #hash naturally; two messages
> > whose selectors and arguments are #= are also equal. But in Cuis, Squeak
> > and Pharo Message inherits #= and #hash from Object, i.e. uses identity
> > comparison. This is, to say the least, annoying. Any objections to
> > implementing comparing in Message to match VisualWorks?
> >
>
> That sounds like an obviously good thing to do :-)
>
> Is the lookupClass instance variable relevant for comparisons? I am
> guessing not, since we already have #analogousCodeTo: for that type of
> comparison.
>
For me it is relevant. Two messages with different lookupClasses, e.g. one
with nil and one with a specific class, represent different messages, one a
normal send one a super send. So my changes in waiting include lookupClass
in both hash and =. I don't think it makes much difference, but the
incompatibility with VisualWorks, while regrettable, feels correct to me.
Dave
>
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181119/780c76bb/attachment.html>
More information about the Squeak-dev
mailing list
|