moviehwa.blogg.se

Crockford javascript the good parts
Crockford javascript the good parts





It is not permitted to name a variable or parameter with a reserved word. So, it is recommended that /* */ comments be avoided and // comments be used instead. Obsolete comments are worse than no comments.īlock comments are not safe for commenting out blocks of code, the following example causes a syntax error: JavaScript has a class-free object system in which objects inherit properties directly from other objects.ĭespite its deficiencies, JavaScript is really good. JavaScript is a loosely typed language, so JavaScript compilers are unable to detect type errors.Ī controversial feature in JavaScript is prototypal inheritance. The bad ideas include a programming model based on global variables. The very good ideas include functions, loose typing, dynamic objects, and an expressive object literal notation. JavaScript is built on some very good ideas and a few very bad ones. Its association with the browser makes it one of the most popular programming languages in the world. JavaScript is an important language because it is the language of the web browser. In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders. After all, how can you build something good out of bad parts? I discovered that I could be a better programmer by using only the good parts and avoiding the bad parts.

crockford javascript the good parts

Most programming languages contain good parts and bad parts.

crockford javascript the good parts

While I like it that the book is small and dense, it still contains unnecessary stuff like all those railroad diagrams used to visualize things a programmer should already know from other languages. The book is like the language it covers: it has good and "bad" parts. about the parts of the language you should use.

crockford javascript the good parts

I have still have trouble in seeing how "We can compose objects out of sets of parts" using the eventuality function in the chapter.JavaScript: The Good Parts is, as the title indicates, about the good parts of the JavaScript programming languages, i.e. I was reading Ch 5.5 of the book in title.







Crockford javascript the good parts