On Tue, Aug 21, 2012 at 5:01 PM, Mark Miesfeld <miesf...@gmail.com> wrote:

> On Tue, Aug 21, 2012 at 1:48 PM, Rick McGuire <object.r...@gmail.com>
> wrote:
>
> > This is fairly simple to implement for the equals/not equals variants.
>  The
> > real open question is how to handle the other comparisons such as >, <,
> etc.
> > These are probably VERY rare situations, but the behavior still needs to
> be
> > defined. I see three obvious paths:
> >
> > 1)  Leave them the way they are today.  For these operators, the
> operation
> > will go through the existing string conversion and perform the
> comparison on
> > the string value "The Nil Object".
> >
> > 2)  Have them always return .false.  It sort of makes sense, but it
> creates
> > some unexpected behavior such as "a > .nil" and "a < .nil" both returning
> > .false.
> >
> > 3)  Make this an error.  This, of course, will really break the rare
> program
> > that happens to be doing this.  On the other hand, the reverse comparison
> > ".nil > a" IS an error today, because only the String class implements
> those
> > comparison methods.
> >
> > I suspect 1) is the course that makes the most sense and will have the
> least
> > disruption.  But I'm interested in opinions on this, and I may have
> missed
> > other potential solutions.
>
> I'll have to think about this some more.
>
> But, my first impression was that .nil is neither less than nor
> greater than anything, so returning .false sort of makes sense to me.
> This wouldn't surprise me  too much: "a > .nil" and "a < .nil" both
> return .false.
>
> Aren't some things just the way they are by definition?  For the docs:
> By definition .nil is neither greater than nor less than anything.
>

Yes, the classic example is NaN in floating point numbers.  In fact, NaN is
not even equal to itself!

Rick


>
> --
> Mark Miesfeld
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to