Elm programming language is a notation for writing programs that run on a web browser. The description of the language is split into two components: syntax and semantics. Syntax refers to the grammatical structure of a program whereas semantics refers to its meaning. For instance, the following code is syntactically invalid in Elm because the
+++ operator doesn’t exist in the language.
There are countless scenarios where Elm can throw a syntactic error. Here are some examples: a misplaced keyword, two operators in a row, unbalanced parentheses, etc.
After a program’s syntactic validity has been established, the next step is to look for semantic errors. For example, the following code is syntactically valid, but semantically invalid. The
++ is a valid operator in Elm, but it can only be used to combine two strings not a string and a number.
For a program to be valid in Elm, it has to be both syntactically and semantically correct.
Elm programming language itself is, however, written in another language called Haskell. Our propensity for creating things that enable us to build other things which in turn are used to build yet another thing is quite fascinating.