Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
BlackholeWA (talk | contribs) No edit summary |
||
Line 1:
A '''symbol''' in [[computer programming]] is a [[primitive data type]] whose [[Instance (computer science)|instances]] have a unique human-readable form. Symbols can be used as [[Identifier (computer languages)|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=https://archive.org/details/programmingrubyp00thom|edition=2. ed., 10. print.|url-access=registration}}</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).
|