Different between symbol and string?


#1

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


#2

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/understanding-ruby-symbols


#3

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.


#4

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…


#5

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