HTML and CSS Reference
In-Depth Information
Conclusion
JavaScript is best described as a multi-paradigm language: it supports the following pro-
gramming paradigms:
• Functional programming
• Imperative programming
• Classical object orientated programming
• Prototype-based programming
Due to its multi-paradigm nature, JavaScript is enormously flexible. The danger with
JavaScript's multi-paradigm nature is that it allows programmers to see in it what they want,
without taking into account which of these paradigms are JavaScript's true strengths.
This chapter has presented the case that JavaScript should be best thought of as a prototype-
based, functional programming language.
JavaScript's approach to functions is a particular strength. First class functions are a power-
ful concept, and allow for concise, reusable code.
JavaScript's approach to prototyping is perhaps its least understood feature, and while un-
usual as a design choice in the language, is another key strength of the language.
Finally, JavaScript has more than its fair share of quirks and design bugs. The key to circum-
venting these is to understand they exist. These quirks can be easily worked around by those
who understand them, but can cause annoying bugs for those who don't.
Search WWH ::




Custom Search