TwoSyntaxesForOneSemantic

From W3C Wiki
Jump to: navigation, search

A language associates a syntax token with a semantic one - often refered in linguistic as signifiant and signifier (or signifié). What are the costs/benefits:

  • for a given (computer) language to have synonymous, ie, two syntaxes token denoting the same semantic?
  • for two separate languages to duplicate one semantic in 2 different syntaxes?

@@@ Integrate the ideas from "Minimum redundancy" in W3C's design principles

Synonymous in a given language

What's the cost of having 2 syntaxes token denoting the same thing? I see 2 subquestions:

  • when is it better to define only one syntax token when the denoted semantics are very close, but not strictly equal (e.g. blockquote/quote in HTML)?
  • what's the cost of having 2 syntaxes token denoting exactly the same thing?

The fact that blockquote and q only differs by their block/inline model creates a duplication of meaning for these elements. There should not be two elements for quotations because it has a cost in development and interoperability. In the case of HTML, it means that if you move your text from one section of your document to another one the Authoring tools has to guess the context (block/inline) to change the nature of the tag, where CSS could simply be used. --KarlDubost

"Synonymous" across languages

The second question is addressed (somewhat) in a TAG finding "Consistency of formatting property names", applied to the specific case of formatting properties, with an edicted principle that "formatting property names, values, and semantics must be consistent across all specifications". But does that apply more widely?

Also related, how can/should a specification import the semantics of a given syntax token in its own semantic space? In XML (and even more in RDF), namespaces can be used to do this. For XML, this relates to the meaning of a mixed namespace document issue raised to the TAG.

Somewhat relatedly, "The essentials of a specification" insists on acknowledging the similarities between specifications and other considerations while "importing" semantics from one spec to another.

QA qa.png