Content deleted Content added
Added K symbol |
Added a missing space. |
||
Line 1:
A '''symbol''' in [[computer programming]] is a primitive [[datatype]] whose [[Instance (computer science)|instances]] have a unique human-readable form. Symbols can be used as [[identifier]]s. In some [[programming languages]], they are called '''atoms'''.<ref name=pickaxe>{{cite book|last=Hunt|first=Dave Thomas ; Chad Fowler ; Andy|title=Programming Ruby the pragmatic programmers' guide ; [includes Ruby 1.8]|year=2001|publisher=The Pragmatic Bookshelf|___location=Raleigh, NC|isbn=978-0-9745140-5-5|url=http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html|edition=2. ed., 10. print.}}</ref> Uniqueness is enforced by holding them in a [[symbol table]]. The most common use of symbols by programmers is for performing language [[reflection (programming) | reflection]] (particularly for [[callback (computer programming)|callbacks]]), and most common indirectly is their use to create object [[linkage (software)|linkages]].
In the most trivial [[implementation]], they are essentially named [[integer]]s (e.g. the [[enumerated type]] in C).
|