[RCR] Object#blank?

  • Thread starter why the lucky stiff
  • Start date
N

Navindra Umanee

why the lucky stiff said:
After some pretty even pro v. con discussion on RedHanded [1], I've
moved the vote to the official RCR site [2].

I present the other popular alternatives in the RCR. So, should this
one fail, hopefully we will still be left with a victor. But I trust my
groomed steed will prevail!!

I can't believe people don't like "vapid?"... it's such a great name!

Cheers,
Navin.
 
N

Nikolai Weibull

* why the lucky stiff (Mar 07, 2005 10:50):
After some pretty even pro v. con discussion on RedHanded [1], I've
moved the vote to the official RCR site [2].

How about Float#nan?? Makes more sense than having 0 as blank, but
perhaps isn't as useful,
nikolai
 
N

Neil Stevens

When will Float#nan? return true?

~> irb
001> (0.0 / 0.0).nan?

==== #<TrueClass:0x00000002> true
002> (0.0 / 0.0).class

==== #<Class:0x040a85e2> Float
 
M

Malte Milatz

Neil Stevens:
001> (0.0 / 0.0).nan?

Sure. Thank you.

Interesting, however, that 1/0, which is described as Infinity, returns
false on 'nan?'. Must be some mathematical logic I'm not concerned with.

Malte
 
N

Neil Stevens

Neil Stevens:

Sure. Thank you.

Interesting, however, that 1/0, which is described as Infinity, returns
false on 'nan?'. Must be some mathematical logic I'm not concerned with.

IEEE FP math isn't the same as regular math. NaN is a specific value, but
there are other non-number values:

009> 1.0 / 0.0

==== #<Float:0x04094c2c> Infinity
010> -1.0 / 0.0

==== #<Float:0x041145f6> -Infinity
 
O

oinkoink

why said:
I present the other popular alternatives in the RCR. So, should this
one fail, hopefully we will still be left with a victor. But I trust my
groomed steed will prevail!!

Calling zero "blank" is really repulsive to mathematical mind.
Object#vapid? was cute, but why not Object#nought? This covers
the semantic territory both of being void and of being zero.

Regards, Bret
 
D

Daniel Berger

oinkoink said:
this trust

Calling zero "blank" is really repulsive to mathematical mind.
Object#vapid? was cute, but why not Object#nought? This covers
the semantic territory both of being void and of being zero.

Regards, Bret

Perhaps we could just use the literal Latin - .nihil?

Regards,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top