Computer programmers, and others who work with languages, sometimes use the related terms: semantics & syntax. They are concepts with a specific application to language, but language is communication and there are many forms of communication. For example, when music is viewed as a language one can apply the concepts of syntax and semantics.
This article (in my queue for years) was meant to introduce those two concepts, but my vision for this blog has evolved in ways that largely moot those original intentions. Why write about topics no one is casually interested in, and which are already covered in exhaustive detail elsewhere for those with a serious interest?
Besides,… this one… turned out different…
Semantics refers to what something means. In general, it refers to the meaning behind any symbol.
And “symbol” is meant in its most general sense as any sign, image, gesture, word, phrase or thing that stands for a specific idea or concept. The international stop symbol is one widely known example; two others are Walt Disney’s famous mouse and the uplifted middle finger.
To programmers, semantics refers to what the code does. For example, the semantics of a print statement is to print something.
While computer semantics are usually specific and fixed, real life semantics can be complex. The semantics of a symbol can change depending on context. For example, the meaning of the word “fire” varies depending on whether we mean house, camp, employment or gun. Symbols can also have different meanings to different people. Political and spiritual symbols, in particular, mean different things to different people.
Many symbols are even considered offensive in some contexts but acceptable in others. (George Carlin based a key comedy routine on the set of words that were offensive regardless of context.) For example, the word “bitch” is acceptable applied to a female canine, but not when applied to female humans (at least not in my opinion).
Syntax refers to the construction of the symbols into groups (sentences, if we’re talking about language). Much of grammar concerns syntax, whereas dictionaries are about semantics. The phrase, “I am a red pencil,” is syntactically correct, while being semantic gibberish.
[In high school, the German club — led by the German teacher — took a trip to Europe every summer. The year I went, we brought along some French students hoping to have "translators" while we visited France. Turned out they were too insecure about their French to actually try to use it — perhaps rightfully so. If there's anything the French seem to hate more than people not using their language, it's people using their language badly. Anyway, we tried to convince the French students to go up to people and say, "Ich bin ein roter Bleistift."]
To a programmer, syntax requirements are usually absolute. Computers are notoriously stupid about understanding what you meant. They only understand what you said.
When you spend your entire day interacting with the dumb computer, it’s easy to become overly precise in life!
Q's… and stay syntactical, my friends!