What is "Simplified JavaScript"?
Douglas Crockford makes reference to Simplified JavaScript in this article about Top Down Operator Precedence. Unfortunately he only makes references to it in this article. The best explanation I found here. But I still don't have a clue what it actually开发者_JAVA百科 is.
What is Simplified JavaScript?
In the context of the Top Down Operator Precedence article, "simplified" means "easier to write a parser for". That is, he wanted to demonstrate how to write a Javascript parser in Javascript, without overcomplicating things by trying to support all the full specfications loveable quirks.
Yes, the features supported in "Simplified Javascript" are very close to those listed as "Good Parts", but the point of that article was not to promote Crockford's world view or book, but to show how to write a language parser (no easy task).
From the article:
We don't have time in this short chapter to deal with the whole JavaScript language, and perhaps we wouldn't want to because the language is a mess. But it has some brilliant stuff in it that is well worth consideration. We will build a parser that can process Simplified JavaScript.
This is probably a reference to Crockford's book Javascript: The Good Parts. In this book, he describes which features of Javascript he feels are "good", as well as those that are "bad" and shouldn't be used.
Simplified JavaScript is not quite a language (yet), but it could be. There is Pratt's/Crockford's Simplified Parser TDOP, and that is a first step, but you would need either a code generator or an interpretor to process the parser's output "tree" into working JavaScript. IMHO that will be a good thing. Then an IDE that would help anyone learn and write this proposed language "Simplified JavaScript", will follow.
精彩评论