# Different between symbol and string?

**URL:** <https://www.ruby-forum.com/t/different-between-symbol-and-string/154601>\
**Category:** Ruby\
**Created:** [December 2, 2008, 3:00am UTC](https://www.ruby-forum.com/t/different-between-symbol-and-string/154601 "2008-12-02T03:00:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrislo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5e9695/32.png) [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Post date:** [December 2, 2008, 3:00am UTC](https://www.ruby-forum.com/t/different-between-symbol-and-string/154601/1 "2008-12-02T03:00:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chrislo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5e9695/32.png) [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Post date:** [December 2, 2008, 3:50am UTC](https://www.ruby-forum.com/t/different-between-symbol-and-string/154601/2 "2008-12-02T03:50:40Z")

</div>

On Mon, 01 Dec 2008 17:54:58 -0800, Chris Li [removed\_email\_address@domain.invalid](mailto: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](http://glu.ttono.us/articles/2005/08/19/understanding-ruby-symbols)

---

<div class="post-metadata">

**Author:** ![chrislo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5e9695/32.png) [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Post date:** [December 2, 2008, 3:16am UTC](https://www.ruby-forum.com/t/different-between-symbol-and-string/154601/3 "2008-12-02T03:16:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chrislo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5e9695/32.png) [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Post date:** [December 2, 2008, 3:55am UTC](https://www.ruby-forum.com/t/different-between-symbol-and-string/154601/4 "2008-12-02T03:55:23Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![chrislo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5e9695/32.png) [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Post date:** [December 2, 2008, 5:11am UTC](https://www.ruby-forum.com/t/different-between-symbol-and-string/154601/5 "2008-12-02T05:11:25Z")

</div>

On Mon, Dec 1, 2008 at 9:49 PM, Phlip [removed\_email\_address@domain.invalid](mailto: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](http://avdi.org)  
Developer Blog: [Avdi Grimm, Code Cleric](http://avdi.org/devblog/)  
Twitter: [http://twitter.com/avdi](http://twitter.com/avdi)  
Journal: [http://avdi.livejournal.com](http://avdi.livejournal.com)
