Forum: Ruby Different between symbol and string ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris L. (Guest)
on 2008-12-02 04:00
What is exactly different between symbol and string ? Symbol has never
appear in other language.
Matthew M. (Guest)
on 2008-12-02 04:16
(Received via mailing list)
On Dec 1, 2008, at 7:54 PM, Chris Li wrote:

> What is exactly different between symbol and string ? Symbol has never
> appear in other language.

In a sense, symbols appear in almost every language, but under another
name: identifier. A Symbol is an identifier without any associated
storage.

Granted, that's probably too simple/naive an explanation. You might
also try searching the archives for this mailing list; discussions
about Symbol have come 'round many a times with some quite thorough
discussions.
_-_ Daniel _-_ (Guest)
on 2008-12-02 04:50
(Received via mailing list)
On Mon, 01 Dec 2008 17:54:58 -0800, Chris Li 
<removed_email_address@domain.invalid> wrote:

> What is exactly different between symbol and string ? Symbol has never
> appear in other language.


http://glu.ttono.us/articles/2005/08/19/understand...
Phlip (Guest)
on 2008-12-02 04:55
(Received via mailing list)
Chris Li wrote:

> What is exactly different between symbol and string ? Symbol has never
> appear in other language.

Except for the Smalltalk #symbol and the Perl "bareword" concept...

Irritatingly, _all_ languages have an internal "symbol table" concept,
but they
keep it hidden. Only the best languages expose it as a programmer
convenience...
Avdi G. (Guest)
on 2008-12-02 06:11
(Received via mailing list)
On Mon, Dec 1, 2008 at 9:49 PM, Phlip <removed_email_address@domain.invalid> 
wrote:
> Chris Li wrote:
>
>> What is exactly different between symbol and string ? Symbol has never
>> appear in other language.
>
> Except for the Smalltalk #symbol and the Perl "bareword" concept...

...and Lisp symbols...

--
Avdi

Home: http://avdi.org
Developer Blog: http://avdi.org/devblog/
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com
This topic is locked and can not be replied to.