In this example, I blame the design of JavaScript. It’s certainly possible to write bad code in any language, but I take exception to the gratuitous footguns.
I do value readability highly. Code is for humans, not just machines, or we’d still be writing programs in binary.
On the other hand, there really are basic things that you are supposed to know. Not being allowed to use them might make your code more comprehensible to a beginner, but it will also make too much code. You shouldn’t have to reinvent the standard library.
There are certain elegant concepts like sets, or monads, or recursion, which a beginner might struggle with, but working around not having them when you need them probably isn’t worth it.
In this example, I blame the design of JavaScript. It’s certainly possible to write bad code in any language, but I take exception to the gratuitous footguns.
I do value readability highly. Code is for humans, not just machines, or we’d still be writing programs in binary.
On the other hand, there really are basic things that you are supposed to know. Not being allowed to use them might make your code more comprehensible to a beginner, but it will also make too much code. You shouldn’t have to reinvent the standard library.
There are certain elegant concepts like sets, or monads, or recursion, which a beginner might struggle with, but working around not having them when you need them probably isn’t worth it.