⇢ The Nightmares of Transitioning to JavaScript Hasitha Liyanage ([email protected])

The year 2000... No one in his right mind would consider using JavaScript for anything except making a web page do something mildly clever

// A trip to the year 2000 - some of the last JavaScript I wrote // before abandoning it for over a decade function next() { if (current != pages && isExpanded == 0) { hide(page[current]); current++; show(page[current]); pageBox.value = current + " of " + pages; } } function hide(name){document.all[name].style.display = "none";} function show(name){document.all[name].style.display = "";}

10 years and 300,000+ lines of C++ later...

import { React, Dispatcher } from 'praxis'; import Note from './Note'; export default class NoteList extends React.Component { constructor(props) { super(props); this.onStoreChange = () => { this.forceUpdate(); }; } render() { var noteElements = []; this.props.notes.forEach(function(note) { noteElements.push(); }); return (
    {noteElements}
); } }

Systems programming languages to JavaScript

"Surprise" #1: Unstructured No classes or modules Global scope No block scope

Surprise #2: Dynamism No types Closures Prototypes Polyfills

// note: NOT a proper implementation! // polyfill if (!Array.prototype.forEach) { Array.prototype.forEach = function(callback, arr) { for (var i = 0; i < arr.length; i++) { callback.call(arr, arr[i]); } } } // use polyfill myArray.forEach(function(item) { console.log(item); });

Surprise #3: Performance Interpreted Garbage collected No real-time guarantees

Surprise #4: Asynchrony Asynchronous I/O Callbacks

Surprise #5: It works on server-side Node.js

Surprise #6: Community Libraries Support Open source

Finally, ECMAScript 2015

Conclusion Your programming knowledge from other languages will translate very well Your job will be much easier But you need to learn to think differently

The Nightmares of Transitioning to JavaScript - GitHub

Surprise #5: It works on server-side. Node.js. Page 13. Surprise #6: Community. Libraries. Support. Open source. Page 14. Finally,. ECMAScript 2015. Page 15 ...

185KB Sizes 2 Downloads 210 Views

Recommend Documents

Emscripten: An LLVM-to-JavaScript Compiler - GitHub
May 14, 2013 - Emscripten, or (2) Compile a language's entire runtime into ...... html.) • Poppler and FreeType: Poppler12 is an open source. PDF rendering ...

Javascript Data Exploration - GitHub
Apr 20, 2016 - Designers. I'm a sort of. « social data scientist ». Paris. Sciences Po médialab. I just received a CSV. Let me grab my laptop ... Page 9 ...

Emscripten: An LLVM-to-JavaScript Compiler - GitHub
Apr 6, 2011 - written in languages other than JavaScript on the web: (1). Compile code ... pile that into JavaScript using Emscripten, or (2) Compile a ... detail the methods used in Emscripten to deal with those ..... All the tests were run on a Len

JavaScript Crash Course - GitHub
Nov 10, 2016 - 1Info on this slide from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures ..... Google (you are smart, figure it out).

Modern JavaScript and PhoneGap - GitHub
ES3 (1999). iOS 3. By Source (WP:NFCC#4), Fair use, https://en.wikipedia.org/w/index.php?curid=49508224 ... Supported by all modern mobile web views. 1. iOS 6+, IE .... Arrow function returns. Single line arrow functions use implicit return: [1, 2, 3

JavaScript Cheat Sheet by DaveChild - Cheatography.com - GitHub
Start of string. $. End of string . Any single character. (a|b) a or b. (...) ... Page 1 of 2. Sponsored by Readability-Score.com. Measure your website readability!

Parallelize JavaScript Computations with Ease - GitHub
It abstracts the messaging-based programming model for a seamless .... difference of Threads.js is its messaging-based programming model that is ...... upload/208631.pdf (visited on 11/20/2016). [16] Microsoft. ... license.php. [26] npm Inc.

Event-Driven Concurrency in JavaScript - GitHub
24 l. Figure 2.6: Message Passing in Go. When, for example, Turnstile thread sends a value over counter ...... Is JavaScript faster than C? http://onlinevillage.blogspot. ... //people.mozilla.com/~dmandelin/KnowYourEngines_Velocity2011.pdf.

Are Java Programmers Transitioning to Multicore? A ...
We would like to know if Java developers are retrofitting appli- cations to become ... neering tools and techniques that can help them to incorporate these mechanisms into existing systems ..... put/output, database access, etc.), and threads that ..

Build Your Own Programming Language with JavaScript - GitHub
Build Your Own. Programming Language ... Parser generators! OMeta-JS. Jison. PEG.js. JS/CC ... ook/LISP%201.5%20Programmers%20Manual.pdf.

Reduction of Nightmares and Other PTSD Symptoms in ...
tenance treatment period terminated at week 20 (endpoint 2). Capsules contained prazosin 1 .... tagonists in the pharmacological management of benign pros-.

Nightmares & Dreamscapes by Stephen King
dollars—but at what price?...A private investigator in ... to dig deep in order to exact revenge for his murdered wife.... These are just some of the ... be full because you can have it inside your lovely laptop even cell phone. This Nightmares &.

(Stephen King) - Pesadillas Y Alucinaciones (Nightmares ...
(Stephen King) - Pesadillas Y Alucinaciones (Nightmares & Dreamscapes).pdf. (Stephen King) - Pesadillas Y Alucinaciones (Nightmares & Dreamscapes).pdf.

Kitchen nightmares us s04e13
0 Pleaserefer to graph 1-3 AnalysingAverage kitchen nightmares us s04e13 Icalculatetheaverage of. theconcordant of volume of oxygen evolved at 120 ...