Allen Wirfs-Brock wrote:
On May 17, 2011, at 11:59 PM, Luke Hoban wrote:
And of course this would also make it harder for IDEs and such to give good first-class syntax highlighting here, because the syntax for this would be ambiguous with user-created stuff.
What kind of syntax highlighting would you want to offer? Distinguishing normal arrays from arrays with non-standard prototypes would be more difficult, but this doesn't seem like a common syntax highlighting need.
In general declarative constructs are easier for tools to analyze than imperative processes built out of function calls. All the complications that were brought up for optimizing the imperative forms also apply to tools and tools don't have any dynamic context available to verify any inferences they may make. This applies to more than just syntax highlighters. Refactoring tools, reference engineering tools, and anything else that wants to statically source code generally will have an easer time with declarative constructs.
While this may be true, why does it matter? JS is imperative and
dynamic. So refactoring tools, etc. have to learn how to deal with it,
easy or not easy.
jjb
Allen
|
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss