help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Re: [bug] Float >> NaN in a dictionary


From: Gwenael Casaccio
Subject: Re: [Help-smalltalk] Re: [bug] Float >> NaN in a dictionary
Date: Fri, 12 Jun 2009 11:29:29 +0200
User-agent: KMail/1.11.90 (Linux/2.6.28-11-generic; KDE/4.2.90; x86_64; ; )

On Friday 12 June 2009 11:09:54 Paolo Bonzini wrote:
> Issue status update for
> http://smalltalk.gnu.org/project/issue/317
> Post a follow up:
> http://smalltalk.gnu.org/project/comments/add/317
>
>  Project:      GNU Smalltalk
>  Version:      <none>
>  Component:    Base classes
>  Category:     bug reports
>  Priority:     normal
>  Assigned to:  Unassigned
>  Reported by:  MrGwen
>  Updated by:   bonzinip
>  Status:       active
>
> I'd say it does not make much sense.  Given that NaNs are ~= to
> themselves, you cannot do anything with them in an equality-based hash
> table (only in a identity-based one).

I understand, I don't know well the behavior of Float.

>
> Were you just playing with fire or did you get into this in some
> real-world case?
>

In fact I'm working on a tool for saving "image" written in Smalltalk. (I need 
to create this tool and not to use the code in the vm) So the idea is to put 
all the objects in a dictionary and we know if the object was written or not 
(and by the way the position of the written object is in the dic) - like the 
SystemTracer in Squeak. But I can handle this problem in an other way.

> I wonder how much if anything would be broken by making Float>>#hash
> raise an exception for NaNs.
>
>
>
>
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

Cheers,
Gwenael

-- 

GtkLauncher for GNU Smalltalk : http://gtklauncher.bioskop.fr/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]