Announcement
iPhone DZone: Fresh Links On Your iPhone by matt at Sat Jul 05 14:09:51 EDT 2008
Reading DZone on your iPhone just got a little bit easier. Visit http://dzone.com/iphone from your iPhone to try out our beta iPhone support. You can view stories, filter by tags, and login. We'd appreciate your feedback at feedback@dzone.com.
We can't do it for you. Login and vote now.
By bloid
via pragdave.blogs.pragprog.com
Published: May 15 2008 / 07:47
Some recent changes in Ruby 1.9 point to the transition away from symbols being immediate objects. In particular, they lose their integer representation, and hence the methods Fixnum.id2name, Fixnum.to_sym, and Symbol.to_i have been removed. I'm expecting to see symbols migrate to the heap as 1.9 continues to evolve.
Comments
bspies replied ago:
Symbols are one of the oddities of Ruby that puzzled me when I first started to learn the language. Why would you want to expose the internals of your language implementation like this? I would be nice to see symbols go away altogether, but probably difficult given how widely they are used in Ruby now.
ceaseoleo replied ago:
I may be wrong.. but this change is good that in a sense.. the symbols will be able to be cleaned up and won't stick around. But we loose some of the performance of the quick lookup.
@bspies Yes.. for example if you know you have a rails app, then you could for example get hit easier with a DOS attack, but in all honesty .. if someone wants to attack your site.. its gonna happen no matter what
Voters For This Link (6)
Voters Against This Link (0)