- Get link
- X
- Other Apps
Etymological Definition of "Syntax" in Computer Programming
The term syntax comes from the Ancient Greek word σύνταξις (sýntaxis), which translates literally to "arrangement," "ordering," or "putting together in order."
Etymological Roots Breakdown
- • σύν (sýn) — meaning "together" or "with"
- • τάξις (táxis) — meaning "arrangement," "order," or "setting in place" (derived from the verb tássein, "to arrange").
Etymological Evolution to Computer Science
-
Linguistics & Grammar (Antiquity to 17th Century):
The word originally described how words are arranged together to construct well-formed phrases and sentences in a natural language according to strict grammatical rules. -
Formal Logic & Systems (Early 20th Century):
Logicians and mathematicians (such as Rudolf Carnap and Gottlob Frege) borrowed the linguistic term to describe the structural rules of formal artificial languages, distinguishing between pure structural form (syntax) and meaning (semantics). -
Computer Programming (Mid-20th Century):
When high-level programming languages emerged in the 1950s (such as Fortran and Algol), computer scientists adopted "syntax" to define the exact set of rules governing how tokens, keywords, operators, and symbols must be arranged for a compiler or interpreter to parse and execute the code without error.
Syntax vs. Semantics in Programming
Understanding syntax by its etymological root ("putting together in order") highlights why code can be syntactically valid yet logically broken:
- Syntax (The Structure): The precise arrangement of symbols. If the layout violates the language's grammar rules, a parser raises a syntax error before the code runs.
- Semantics (The Meaning): What the validly arranged code actually does when executed.
# Syntactically correct (valid arrangement of tokens),
# but semantically broken (causes a runtime zero-division error):
result
=
10
/
0
Comments