There are two main classes of errors : syntax (or grammatical) errors and semantic (or logical) errors :
Syntax errors
This first class of errors that can be made are relatively easy to detect, in the first case by a human and in the second case by a compiler at compile-time. It's just like a grammar error in a language. For example in English : "I is hungry" instead of "I am hungry".
Semantic errors
This second class of errors that can be made are much harder to detect for humans and in general impossible for the compiler to pick up (obviously the computer does not know what the programmer intended). If we keep the example of the English language, it's like if you tell somebody : "Let's meet tomorrow at 8am" but you meant 8pm.


No comments:
Post a Comment