Equality quirks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Equality quirks

Artur Zaroda
Hello,

I believe that, according to ANSI, the following shouldn't happen:

(0@0)=0 "false"
0=(0@0) "true"

and neither should this:

(1/2) hash=0.5 hash "false"
0.5=(1/2) "true"

or this:

1 hash=(1@1) hash "false"
1=(1@1) "true"

or this:

(1 to: 1) hash=#(1) hash "false"
(1 to: 1)=#(1) "true"

The last two work this way in VW (3.0) too, but I still consider
any situation where #hash doesn't agree with #= a bug since it
results in "funny" things like:

s:=Set new.
s add: 2; add: 1/4; add: 0.25.
s includes: 0.25. "true"
s remove: 2.
s includes: 0.25 "false"

Artur Zaroda
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Equality quirks

Andy Bower
Artur,

Thanks for you ever present vigilance. This is now recorded as defect #239.

Best Regards,

Andy Bower
Dolphin Support
http://www.object-arts.com

---
Visit the Dolphin Smalltalk WikiWeb
http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm
---

"Artur Zaroda" <[hidden email]> wrote in message
news:[hidden email]...

>
> Hello,
>
> I believe that, according to ANSI, the following shouldn't happen:
>
> (0@0)=0 "false"
> 0=(0@0) "true"
>
> and neither should this:
>
> (1/2) hash=0.5 hash "false"
> 0.5=(1/2) "true"
>
> or this:
>
> 1 hash=(1@1) hash "false"
> 1=(1@1) "true"
>
> or this:
>
> (1 to: 1) hash=#(1) hash "false"
> (1 to: 1)=#(1) "true"
>
> The last two work this way in VW (3.0) too, but I still consider
> any situation where #hash doesn't agree with #= a bug since it
> results in "funny" things like:
>
> s:=Set new.
> s add: 2; add: 1/4; add: 0.25.
> s includes: 0.25. "true"
> s remove: 2.
> s includes: 0.25 "false"
>
> Artur Zaroda
> [hidden email]
>
>