|
|
|
|
|
by stcredzero
6398 days ago
|
|
The author is against language features implemented as a library. However, the drawbacks he points to are really a lack of community programming conventions. If there were an agreed on standard Javascript way to do things like traditional OO class based inheritance, then there wouldn't be the problems he cites. Having such conventions encoded as syntax would reduce some of the power of Javascript. The fact that you can implement your own domain-specific mini-language is very powerful. This is really pointing back to the old "Cathedral vs. Bazaar" dichotomy. |
|
Objective-J's code importer is one of the more complex pieces (as it manages to do so completely asynchronously). All the approaches that use a simple JavaScript function to grab code, like grab_and_eval("file.js") are forced to happen synchronously (since you have to guarantee that the code is evaled before the next line). Without some sort of lexing support, its really not possible to both grab files asynchronously and also be able to continue executing.
Also, as stated in the article, you can't intercept JavaScript method calls, so if you want something like method missing you're forced to do something like:
call_method_or_send_method_missing(object, "method_name")
And again, since Objective-J is a proper superset of JavaScript, it doesn't lose any of its powerful features.