Syntax & Semantics

Spiff SyntaxComputer 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…


Words are the kernels of semantics;
They are the atoms of thought.
Words combine into phrases and sentences;
They are the molecules of meaning.
From the molecules we form our images and solutions;
They are the substance of ideas.


Semantics refers to what something means. In general, it refers to the meaning behind any symbol.

mouse fingerAnd “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 erroarSyntax 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.”]

syntax cityTo 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!


A. The next statement is false.
B. The previous statement is true.
A asserts not-B; B asserts A; therefore not-B implies not-A;
Not-A implies B; B asserts A;
A asserts not-B; ……
It rained all night the day I left; the weather, it was dry.

Watch your P‘s and Q‘s… and stay syntactical, my friends!


About Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts. View all posts by Wyrd Smythe

6 responses to “Syntax & Semantics

  • dianasschwenk

    Loved this. My fave line in this whole post? “Ich bin ein roter Bleistift.”!

    • Wyrd Smythe

      😀 That’s right, you have roots there!

      • dianasschwenk

        ja und Deutsch ist meine erst sprache!

      • Wyrd Smythe

        Really! Too bad I didn’t know you when I was in high school. I struggled through four years of German and barely could handle the basics. It’s weird; computer languages I can learn easily, but I just can’t seem to grasp human languages (failed to learn Spanish, too). Might be related to my hearing issues — unable to hear certain sounds maybe?

        I may be off-line (or weird) for a few days (or longer). Bad news from California last evening. Probably the final days for mom. She slipped into unconsciousness yesterday, is being loaded up with serious pain meds (for the incomplete help they offer), and we’re all just waiting now. I’ve kind of gone from being at loose ends to being besides myself and barely know what I’m doing. Can’t seem to focus on anything right now.

      • dianasschwenk

        Oh Smitty, I’m so sorry to hear that. Listen my thoughts and prayers are with you. Are you going to California? Safe travels if you are.
        Hugs to you my friend
        Diana xo

And what do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: