Subject RE: [Firebird-Architect] JavaScript as Database Scripting Language
Author Michael D. Spence
> -----Original Message-----
> From: Firebird-Architect@yahoogroups.com
> [mailto:Firebird-Architect@yahoogroups.com] On Behalf Of Jim Starkey
> Sent: Friday, December 26, 2008 10:32 AM
> To: Firebird-Architect@yahoogroups.com
> Subject: [Firebird-Architect] JavaScript as Database
> Scripting Language
>
>
> 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
>

Have you read Douglas Crockford's book?

http://oreilly.com/catalog/9780596517748/



Michael D. Spence
Mockingbird Data Systems, Inc.