adjectives - What does "canonical" mean?
Sometimes I read a sentence containing the word canonical, but I cannot find appropriate meaning of the word.
For example, in this link:
Returns a canonical representation for the string object.
It's hard for me to find an appropriate definition from Google:
ca·non·i·cal Adjective /kəˈnänikəl/
- According to or ordered by canon law
- the canonical rites of the Roman Church
- Included in the list of sacred books officially accepted as genuine
- the canonical Gospels of the New Testament
- Accepted as being accurate and authoritative
- the canonical method of comparative linguistics
- (of an artist or work) Belonging to the literary or artistic canon
- canonical writers like Jane Austen
- According to recognized rules or scientific laws
- canonical nucleotide sequences
- Of or relating to a general rule or standard formula
- Of or relating to a cathedral chapter or a member of it
Answer
When this word is used by programmers, it is a synonym for "authoritative," "standard," or "official." That's meaning number 3 in the definition you quote.
It implies that there is one best, most official, most standard way to represent the string object and this is it.
For example sometimes things can be represented using a relative link or an absolute link. Relative might be something like ../foo.txt
meaning "The file foo.txt in the folder above this one" while absolute is something like \\www.example.com\fileserver\share\foo.txt
which can only refer to one file on the Internet. One might say that the latter name is canonical.
Comments
Post a Comment