null > 0 // false
null == 0 // false
null >= 0 // ... true
JS syntax size
Time
ES6
By Chris Williams
17K+ LoC
200K+ LoC
const myNumbers = [1, 2, 3, 4, 5];
let squaredNumbers = [];
for(number of myNumbers) {
squaredNumbers.push(number * number);
}
const myNumbers = [1, 2, 3, 4, 5];
const squaredNumbers = myNumbers
.map(number => number * number);
function sendEmail(user) {
}
No unwanted side-effect
function sendEmail(user) {
if (user.email === null) {
throw new Error('No email provided for the user');
}
}
function sendEmail(user) {
if (user.email === null) {
throw new Error('No email provided for the user');
}
launchNuclearMissile();
}
Side-effect = command, explicitely declared
"Elm has a very strong emphasis on simplicity, ease-of-use, and quality tooling."
1.2.3
Nothing changed for the outside
Something was added
Something has changed
See also Building Trust: What Has Worked by Richard Feldman
and What is success? by Evan Czaplicki
-- a single line comment
{- a
multiline
comment
-}