In this document I wish to explain the difference between operational and denotational semantics. It may sound like a dry subject but you and I both will learn plenty from it.
Semantics of a language defines how the language behaves, where as the syntax of a programming language defines how it is formed.
- Syntax is the foundation of a language;
- Semantics give purpose to the syntax;
- Syntax errors often lead to semantic errors, but they don't have much of a 'causual' relationship;