Symbol (programming): Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Copy edit}} {{Generalize}}
Grammar fix.
Tags: Mobile edit Mobile web edit
Line 2:
 
{{Short description|Datatype in programming}}
A '''symbol''' in [[computer programming]] is a [[Primitive data type|primitive]] [[data type]] whichwhose [[Instance (computer science)|instances]] have a unique human-readable form. Symbols can be used as [[Identifier (computer languages)|identifier]]s. In some [[programming language]]s, they are called '''atoms'''.<ref name=pickaxe>{{cite book |last1=Thomas |first1=Dave |author1-link=Dave Thomas (programmer) |last2=Fowler |first2=Chad |last3=Hunt |first3=Andy |author3-link=Andy Hunt (author) |year=2001 |title=Programming Ruby the pragmatic programmers' guide; [includes Ruby 1.8] |publisher=The Pragmatic Bookshelf |___location=Raleigh, North Carolina |isbn=978-0-9745140-5-5 |url=https://archive.org/details/programmingrubyp00thom |edition=2nd, 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 to perform language [[Reflective 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 (programming language)|C]] language.