JavaScript Sucks

By Xah Lee. Date: .

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. [see JavaScript: Test Object Equality]

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 (example: y-combinator). (example: 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. (example: 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.

been thinking, to fix the js problem by removing some features, we'd gain a lot by,

  1. Ban the keyword function.
  2. Ban the keyword this.
  3. Ban the keyword new.
  4. Ban the use of property key "prototype".
  5. Ban the use of property key "constructor".
  6. Ban the keyword delete. [see Delete operator]
  7. Ban the keyword var.
  8. Ban ==.

JavaScript Spec Reading