JavaScript Sucks
Why JavaScript is the Suckest Language
JavaScript is truly the suckest language. There's no easy way to test object equality, forces you to change your code's algorithms, fundamentally.
and JavaScript syntax, is the worst possible. Code written by others is not readable.
why is js syntax unreadable? because
it has function expression, but it does not have the usual function programing languages's design to control it. JS is mostly imperative and prototype OOP, incompatible with function programing. Thus, you have passing function as argument and return function. This feature by itself, if used without fine control, creates incomprehensible code (e.g. y-combinator). (e.g. haskell has types, composition, currying, etc, to control complex function semantics.)
And JavaScript syntax is C/Java-like, provides no syntactic support for function programing. The passing function style becomes unreadable quickly. (e.g. lisp solves syntax problem by almost pure nested parenthesis, and haskell etc provides linear syntax (no parenthesis), and syntax that support semantic features such as currying, lambda, nesting, etc.)
Further, JavaScript design that was trying to emulate Java, created the following entities with exceptionally convoluted semantics.
- JS: thisBinding
- JS: Property Key "prototype"
- JS: Operator “new”
- JS: instanceof Operator
- JS: Property Key "constructor"
been thinking, to fix the js problem by removing some features, we'd gain a lot by,
- Ban the keyword
function
. - Ban the keyword
this
. - Ban the keyword
new
. - Ban the use of property key
"prototype"
. - Ban the use of property key
"constructor"
. - Ban the keyword
delete
. 〔see Delete operator〕 - Ban the keyword
var
. - Ban
==
.