Most language subsets are defined to allow the secure execution of untrusted code. There is one interesting subset defined for different reasons. We’ll cover that one first, and then cover secure language subsets.
The Good Parts
Most programming languages contain good parts and bad parts. I discovered that I could be a better programmer by using only the good parts and avoiding the bad parts.
Crockford’s subset does not include the
continue statements or the
eval() function. It defines functions
using function definition expressions only and does not include the
function definition statement. The subset requires the bodies of
loops and conditionals to be enclosed in curly braces: it does not
allow the braces to be omitted if the body consists of a single
statement. It requires any statement that does not end with a curly
brace to be terminated with a semicolon.
The subset does not include the comma operator, the bitwise
operators, or the
-- operators. It also disallows
!= because of the type conversion they
perform, requiring use of