Pseudo-classical vs. “The JavaScript way”

后端 未结 4 741
野趣味
野趣味 2021-01-30 03:22

Just finished reading Crockford\'s \"JavaScript: The Good Parts\" and I have a question concerning his stance on the psuedo-classical vs. prototypal approaches.

4条回答
  •  情深已故
    2021-01-30 04:00

    See: Is JavaScript's “new” Keyword Considered Harmful?

    It's important to remember that Crockford, like so many other JavaScript programmers, first approached the language with an eye toward "fixing" it - making it more like other (so-called "classical") OO languages. So a large amount of structural code was written, libraries and frameworks built, and... then they started to realize that it wasn't really necessary; if you approach JS on its own terms, you can get along just fine.

提交回复
热议问题