Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
very newbie question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Robert Klemme, post: 4652698"] I think initially I found it irritating, too. But that was just for a very short period. Nowadays I believe you hit the nail on the head: it's logically preferable. Often, code that looks up something in a Hash or other data structure will return nil if nothing is found. If you have numbers in there, code will get more complicated if also 0 can be stored , you want a 0 returned to be evaluated as a "hit" and the language would evaluate 0 as false in a boolean context. Kind regards robert [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
very newbie question
Top