Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
What's up with symbols?
Hans-Eric Grönlund
4/3/2006 1:06:00 PM
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
--
Posted via
http://www.ruby-...
.
2 Answers
Daniel Harple
4/3/2006 2:19:00 PM
0
On Apr 3, 2006, at 3:06 PM, Hans-Eric Grönlund wrote:
> 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.
Hi,
See:
* [Symbols Are Not Immutable Strings][1]
* [Many previous discussions on the list][2]
[1]:
http://onestepback.org/index.cgi/+...
SymbolsAreNotImmutableStrings.red
[2]:
http://groups.google.com/group/comp.lang.ru...
group=comp.lang.ruby&q=symbols&qt_g=1&searchnow=Search+this+group
-- Daniel
james_b
4/3/2006 2:22:00 PM
0
Hans-Eric Grönlund wrote:
> 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?
No. There was a lengthy thread about Symbols here on ruby-talk not too
long ago, so perhaps you'll want to search the archives.
> 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.
See also
http://www.oreillynet.com/ruby/blog/2005/12/symbols_strings_methods_a...
http://www.oreillynet.com/ruby/blog/2005/12/digging_into_ruby_symb...
--
James Britt
"A language that doesn't affect the way you think about programming is
not worth knowing."
- A. Perlis
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
What's up with symbols?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password