.::output >> /dev/null::.

where otherwise good ideas go to waste

Ruby Symbols

Posted by Nicholas Chen Sat, 20 Aug 2005 09:55:46 GMT

Gluttonous:

"So really, what is a symbol? Simply, a symbol is something that you use to represent names and strings. What this boils down to is a way to efficiently have descriptive names while saving the space one would use to generate a string for each naming instance."

(Via If You Don't Get Symbols.)

This is a really informative post on Ruby and symbols. And there is enough of why's influence to make it an easy read. Bottom line, if you want to save some memory space use symbols especially as keys for hashes.

Posted in , | no comments |

Trackbacks

Use the following link to trackback from your own site:
http://blog.vazexqi.com/trackbacks?article_id=110