On Sep 18, 2005, at 4:12 PM, Brian Mitchell wrote: > Javascript. It is a very cool language. Like Io in many ways too. If > you can get passed the bad rap of DHTML then this language is very > well designed. But, to put in my two cents, it ain't perfect. The language is made up of objects (with methods, properties), and it lends itself quite well to making simple hash-objects which all 'inherit' from the same object. (The 'prototype' property of functions is like Lua's __index metatable property, causing a lookup-chain to be used for specific objects. Despite the name of the property, it is not a 'prototype- based' language, since instances of a 'class' refer to that class, rather than being copies of it.) However, despite my own love of JavaScript, it ain't pretty in three regards: 1) There's no standalone interpreter (that I know of, and certainly not part of any 'official' distribution), which leaves you at the mercy of WSH or some sort of web-based interpreter[1]. 2) Similarly, the core language can do very little on its own. No file IO, no http libraries, no threading, no matrix or math libraries. You're at the mercy of whatever additional libraries your interpreter (or own JS bindings) give you.[2] 3) You can simulate a class, but not too well[3]. (You can use closures to define 'private' and 'protected' methods, but they require new instances of the method functions to be allocated for each instance of the object.) Inheriting one class from another is even more difficult[4]. Lua is powerful because it's bare-bones speedy and simple, but it's not enjoyable to work with as a scripter. Ruby is awesome for the scripter, but (at the moment) too slow to do everything in for CPU- intensive apps. JS is sort of a nice mix between pleasing features and speediness. But only if you have a good interpreter and environment exposing all the native objects you need to get your work done. Basis for my analysis: I've been programming in JavaScript in web browsers since 1996, and using it in my company's 3D product[5] with JS bindings to C++ native methods[6] for the last year. [1] http://phrogz.net/tmp/simplejs.html [2] http://phrogz.net/ObjJob/objects.asp?langID=4 [3] http://phrogz.net/JS/Classes/OOPinJS.html [4] http://phrogz.net/JS/Classes/OOPinJS2.html [5] http://www.anark.com/ [6] http://phrogz.net/ObjJob/objects.asp?langID=11