Literals | #NaN vs. (Float bindingOf: #NaN)

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

Literals | #NaN vs. (Float bindingOf: #NaN)

marcel.taeumel
Hi, there.

Given such a method:

Float >> #foobar
   ^ #(NaN)

Should this be true:

(Float >> #foobar) hasLiteral: (Float bindingOf: #NaN)

I think not...

Best,
Marcel


Reply | Threaded
Open this post in threaded view
|

Re: Literals | #NaN vs. (Float bindingOf: #NaN)

Eliot Miranda-2
Hi Marcel,

On Thu, Jul 4, 2019 at 1:26 AM Marcel Taeumel <[hidden email]> wrote:
Hi, there.

Given such a method:

Float >> #foobar
   ^ #(NaN)

Should this be true:

(Float >> #foobar) hasLiteral: (Float bindingOf: #NaN)

I think not...

I agree.   (Float >> #foobar) hasLiteral: #NaN should be true, but not the bindingOf: variant.  However, in the UI it is helpful if the false positive shows up because that symbol *could* be used in a query.  So IMO at some level the UI ought to be using two queries, one for the binding and one for the binding's key.


Best,
Marcel



--
_,,,^..^,,,_
best, Eliot