What's up with symbols?

Discussion in 'Ruby' started by Hans-Eric Grönlund, Apr 3, 2006.

  1. Hello fellows!

    I'm trying to understand symbols. Not what they are, but rather why Ruby
    has them. They are neat and I use them, but effectively you end up with
    the same thing using plain strings, right? So why extend the language? I
    get the feeling I'm missing a big point so please help me out by
    pointing it out to me.

    Best regards

    Hans-Eric Grönlund
     
    Hans-Eric Grönlund, Apr 3, 2006
    #1
    1. Advertisements

  2. Hi,

    See:

    * [Symbols Are Not Immutable Strings][1]
    * [Many previous discussions on the list][2]

    [1]: http://onestepback.org/index.cgi/+Tech/Ruby/=20
    SymbolsAreNotImmutableStrings.red
    [2]: http://groups.google.com/group/comp.lang.ruby/search?=20
    group=3Dcomp.lang.ruby&q=3Dsymbols&qt_g=3D1&searchnow=3DSearch+this+group

    -- Daniel=
     
    Daniel Harple, Apr 3, 2006
    #2
    1. Advertisements

  3. Hans-Eric Grönlund

    James Britt Guest

    No. There was a lengthy thread about Symbols here on ruby-talk not too=20
    long ago, so perhaps you'll want to search the archives.

    See also

    http://www.oreillynet.com/ruby/blog/2005/12/symbols_strings_methods_and_v=
    a.html
    http://www.oreillynet.com/ruby/blog/2005/12/digging_into_ruby_symbols_1.h=
    tml



    --=20
    James Britt

    "A language that doesn't affect the way you think about programming is=20
    not worth knowing."
    - A. Perlis
     
    James Britt, Apr 3, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.