HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

DZone depends on you. Login and vote now.
Link 80746 thumbnail
User 111696 avatar

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.
  • 6
  • 0
  • 1641
  • 0

Comments

Add your comment
User 264051 avatar

bspies replied ago:

0 votes Vote down Vote up Reply

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.

User 283139 avatar

ceaseoleo replied ago:

0 votes Vote down Vote up Reply

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

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (0)