Profile cover photo
Profile photo
Douglas Crockford
19,133 followers -
_ __ ___ ____ _____ In the Twenty First Century!
_ __ ___ ____ _____ In the Twenty First Century!

19,133 followers
About
Douglas's interests
Douglas's posts

Post has attachment

Post has attachment
I will be headlining at the Great Indian Developer Summit in Bangalore and Pune.

Post has attachment

Post has attachment
There are two ways to make secure software: The Juniper Way and the Chinese Way. Guess which works? And who do back doors really benefit?

A True Story

In 2011 I spoke at TXJS in at the Alamo Drafthouse in Austin. They started serving alcohol in the morning, and people were drinking all day long. As the day went on, the talks got stupider and stupider.

I don't recommend serving alcohol during conferences.

Post has attachment
JavaScript's function scope rule says that an inner function can implicitly see the variables of outer functions and must explicitly declare its own variables.

|   function javascript() {
|       var a = 0;
|       function inner() {
|           var b = a;
|       }
|   }

So imagine another language that does it the other way. There is no 'var' statement because variable declaration is implicit. But to see an outer variable, you must first use a 'see' declaration.

|   function another() {
|       a = 0;
|       function inner() {
|           see a;
|           b = a;
|       }
|   }

Any program that could be written JavaScript could also be written in the another language. The difference is in programmer convenience (very low value) and error avoidance (very high value).

Which language would be better at avoiding declaration and scope errors?
-
votes visible to Public
26%
JavaScript
50%
Another
24%
Neither has a significant advantage

Edward Snowden is an American Hero.

It is time that we bring him home.

What do these letters have in common?

    c o s u v w x z

Post has attachment
ES6 fat arrow functions, aka farts, offer some syntactic convenience, but also come with syntactic complexity and confusion.

Should JSLint recommend that all => expressions be replaced with function expressions?
-
votes visible to Public
34%
Yes
52%
No, just the problematic cases
14%
No, never

Post has attachment
Since the feds have failed to repair their broken patent system, the states are starting to act.
Wait while more posts are being loaded