Subject JavaScript as Database Scripting Language
Author Jim Starkey
The things that I like about JavaScript are:

1. Familiar and relatively terse syntax.
2. Soft types
3. Extensible objects
4. Object inheritance (object can inherit attributes from another object)
5. Exception handling

What I don't like:

1. Functions as assignable objects (aka first class function). I see
the cost but not the benefit.
2. Function ambiguity. A single function can be a standalone
function, a method on object, and an object constructor.
3. Invisible context. An attribute reference in a function is
determined by the call path rather than the function definition.
4. The runtime cost of name resolution in such a complex environment.

In short, I see excessive generality that results in difficult to
diagnose bugs as well as unnecessary runtime overhead.

I wonder whether substituting rudimentary class definitions for "first
class" functions might make sense. Wouldn't be JavaScript anymore, but
that wasn't a goal in the first place.

Any thoughts?

--
Jim Starkey
President, NimbusDB, Inc.
978 526-1376