Converting nil

November 2, 2008 at 2:59 pm Leave a comment

Check C,C++,Java, JavaScript or any other langugage which treats “nil” as something different–probably a meaning equivalent to “a person having 5 hands”. But in Ruby you may use

nil.to_s —>> “0″

nil.to_i —->> 0

Is this really breaking the original stream of programming languages?

Entry filed under: Ruby. Tags: , .

Chrome: Google’s Browser Layoff…jobcuts…recession

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories

posts[:recent]

@@name = PRAYAS

This blog has more intention for my self reference@24×7. But if some search engine crawler directs you to my page, believe I may learn form your comments or feedback. Hence feel free to comment good or bad!
prayas2010@gmail.com

visitors[:since_Mar'08]

free web counter

Prayas@Nikon

A colored life

Chhweet Kidss

An independent world

More Photos

Feeds


Follow

Get every new post delivered to your Inbox.