What is the meaning of the term "canonical" in the context of programming?

Asked

Viewed 5,134 times

12

I have seen a lot of this term in several places with regard to programming area.

For example, I’ve seen something like below, right here in Sopt:

"a canonical response is needed"

The dictionary tells me that the word "canonical" means:

Canonical is an adjective that characterizes that which is in accord with the canons, with established or agreed standards.

But it seems to me something more related to religion. And in the context of programming, what does that actually mean? What would be something canonical and something non-canonical in programming? What example in programming is used the term?

  • Example of a canonical answer I have already posted: https://answall.com/a/63736/132

  • The canonical term would be something like "reference standard".

  • 5

    I think your question lacks canonical answer.

2 answers

12


ca Nô ni co (Latin Canonicus, -a, -um) adjective

  1. Of the canon or of it.

  2. According to the canons or dogmas of the Church.

  3. [Linguistics] Which follows the most usual or more neutral structure in the language (e.g. the canonical order of the elements of the phrase in English is subject-verb-object.).

"", in Dicionário Priberam da Língua Portuguesa [online], 2008-2013, https://www.priberam.pt/dlpo/can%C3%B4nica [consulted in 04-12-2017].

In our context it may have some slightly different meanings.

Canonical is like a law, it is something that says unequivocally (within certain precepts) that it is true, preferably without noises that interfere with this truth. It is a rule known and applied in general. There is no need to challenge (under certain criteria, it is not enough to be a dogma).

Canonical is something validated, consensual, of universal domain, unique.

Synonyms: recognized, authoritative, accepted, sanctioned, approved, established, orthodox.

One of the things we can say about canonicity in programming is the DRY. The truth of an object must be in only one place. It cannot have two sources that deal with the same thing since they may end up distancing themselves. Understand that letting something be modified and/or extended or composed in a liberated way as part of the architecture and if it is well thought out does not make it non-canonical. Is known as canonical form.

In XML has a specific context. Or in DNS. Or web content. Just to name a few.

"a canonical response is needed"

We need an answer that serves as a universal reference, that is complete and correct and says everything you need on the subject and that can be used to close several specific questions that are ultimately answered well with the canonical generic response. One answer answers all questions.

If people understood every comma behind all canonical philosophy, separation of responsibilities and cohesion, they probably wouldn’t speak in OOP.

  • 4

    I’m wondering if it’s not the case to migrate this to [Portuguese.se].

  • 1

    @The non-canonical is exactly what the word says, is what is not canonical.

  • 1

    @In fact the concept is very generic, and the application in each area or sub-area is directly derived. Just know the area. If it is to list all the applications of "canonical" in programming/computing, then the question is already too wide.

  • 2

    So the question is unclear because the term means this, unless you want me to talk about everything where it can be used, then it’s wide.

  • I reread it calmly and I understood the concept. Thanks!

  • @bfavaretto this question is kind of in the limbo between the [pt.so] and the [Portuguese.se]...

Show 1 more comment

-5

Interesting question. And as one of the friends said, deserves a canonical answer (rs).

In fact, although widely used in religious circles, 'canonical' relates to 'canon'. Something like 'generally accepted', 'accepted as standard' etc.

So a page with FAQ is a list of canonical questions, in this broader sense.

  • And where’s the answer?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.