Skip to content

gengwg/javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

javascript

good

Chapter 1 Good Parts

When Java applets failed, JavaScript became the 'language of the web' by default. it's the language of the web browser. The Web has become an important platform for application development, and java script is the only language that is found in all browsers. its association with the browser makes it one of the most popular language in the world. if you have a web browser and any text editor, you have everything you need to run javascript programs.

the very good ideas include functions, loose typing, dynamic objects, and an expressive object literal notation. the bad idears include a programming model based on global variables.

lisp in C's clothing.

Chapter 2 Grammar

/* */ comments can occur in regex literals, so recommend us //.

javascript was built at a time when unicode was a 16-bit character set, so all characters in js are 16 bits wide.

js doesn't have a character type. to represent a character make a string with just one character in it.

retrieval [] or .

objects are passed around by reference; they are never copied.

one way to minimize use of global variables is to create a single global variable for your application. that variable then becomes the container for your application.

chapter 5 inheritance

in classical languages, objects are instances of classes, and a class can inherit from another class. js is prototypal language, which means that objects inherit directly from other objects.

Chapter 7 Regular Expressions

syntax came from java. functions from scheme, prototypal inheritance from self. regex from perl

Chapter 9

global variables become increasingly problematic as programs scale in complexity.

chapter 10 beautiful features

functions as first class objects

dynamic objects with prototypal inheritance. objects are class-free. we can add a new member to any object by ordinary asignment.

object literals and array literals. js literals were the inspiration for hte json data interchange format.

features can have a negative value to consumers because they make the products more difficult to understand and use.

A Aweful parts

variables decared in a block is visible everywhere in the function containing the block.

Releases

No releases published

Packages

No packages published