Learning new words

Post on 27-Jun-2015

1,495 views 0 download

Tags:

description

Godwin's Law for JavaScript: as people discuss a proposed extension to JavaScript syntax, the likelihood of someone saying "Stop trying to turn JavaScript into Java!" approaches 1. For years I've tried to understand this perspective. Why are there so many people out there for whom present-day JavaScript is Good Enough™? What crucial aspect of JavaScript's identity are they trying to defend? Why do they get so scared when someone suggests new syntax? Can we figure out how to evolve the language without incurring the wrath of their pitchforks and/or torches?

transcript

Learning new words

English

Old English

Norman conquest of England

anniversary yeartide

musician gleeman

conclusion endsay

“inkhorn terms”

I am of this opinion that our own tung should be written cleane and pure, unmixt and unmangeled with borowing of other tunges; wherein if we take not heed by tiim, ever borowing and never paying, she shall be fain to keep her house as bankrupt.

Sir John Cheke,16th century scholar

For the barbarousnesse of our tongue, I must lykewyse say that it is much the worse for [the objectors], and some such curious fellowes as they are: who if one chaince to derive any word from the Latine, which is insolent to their eares, they foorthwith make a jest at it, and terme it an Inkehorne terme. It is indeed the ready way to inrich our tongue, and make it copious, and it is the way which all tongues have taken to inrich themselves. I know not how we should speake any thing without blacking our mouthes with inke.

George Pettie16th century author

“Anglish”

The Anglish Moothttp://anglish.wikia.com

Banded Folkdoms of Americksland

ForesitterBarack Obama

Folkrike Mootbandof the

French

L’Académie française

40 membersserving life terms

walkman baladeur

so!ware logiciel

email courriel

#hashtag

mot-dièse

JavaScript

How do we wantour language to evolve?

top-downvs.

bottom-up

New “words” must comefrom the standards body...

…but they’ll run up againstcommunity-made patterns.

ClassesTHREE.SkinnedMesh = function (geometry, material) { THREE.Mesh.call(this, geometry, material);

this.identityMatrix = new THREE.Matrix4(); this.bones = []; this.boneMatrices = []; // ...};

THREE.SkinnedMesh.prototype = Object.create(THREE.Mesh.prototype);

THREE.SkinnedMesh.prototype.clone = function (object) { if (object === undefined) { object = new THREE.SkinnedMesh(this.geometry, this.material); } THREE.Mesh.prototype.clone.call( this, object ); return object;};

class SkinnedMesh extends THREE.Mesh { constructor(geometry, material) { super(geometry, material); this.identityMatrix = new THREE.Matrix4(); this.bones = []; this.boneMatrices = []; // ... } clone(object) { if (object === undefined) { object = new THREE.SkinnedMesh(this.geometry, this.material); } super(object); return object; }}

“Leave classes in Java where they belong! The only people who want classes are the ones who don’t understand the inherent beauty of prototypal inheritance.”

(paraphrased)

JavaScript is not Java.

The challenge:

gender-indeterminate pronouns

“A doctor must not harm his patients.”

“A doctor must not harm eir patients.”

“A doctor must not harm his/her patients.”“A doctor must not harm their patients.”

Code ideas are spreadthrough popular usage.

If you want people to use a new word,make sure it’s in the things they read.

So… here’s what we can do:

Document the hell out of the new stuff.

Use them in your projects.

Give people therapy.

JavaScript will be OK.

(the end)

@andrewduponthttp://andrewdupont.net