SlideShare a Scribd company logo
1 of 38
Advancing JavaScript without
breaking the web.
MunichJS, March 2015
Chris Heilmann (@codepo8) Munich, Bavaria (formerly Germany)
Generic
solutions are
easy to
discredit.
New and more
advanced uses
of JavaScript
means we
need to
improve the
language.
Locking people out is
not an option.
The success of
JavaScript was and is
based on its
availability on the web
across browsers.
The problem is that
once something is on
the web, it is
impossible to remove
and we can’t force
everyone to stay up to
date.
'use strict';
strict mode is a way to opt in to a restricted variant of
JavaScript. Strict mode isn't just a subset: it
intentionally has different semantics from normal
code.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode
https://drive.google.com/file/d/0B2p58mpwToefRzlGMzRxTnhNb00/view
'use sanity';
'use the force';
A version that allows for smooth and exciting 60fps
animations by moving things magically around.
Canvas only.
'use paper and material provided';
A version for Polymer
'use emity';
An Apple specific version with libraries to create
glitchy graphical effects and a connection testing
feature that randomly disconnects WiFi
'use to excite VCs';
A specialist version dedicated to IOT and VR
'use this, bro!';
A version that makes omitting semicolons mandatory,
automatically moves opening braces to the next line
and commas to the start of the next line. Limited for
use in the Silicon Valley only (geofenced)
Seriously, now…
When it comes to
new functionality, we
can always use
progressive
enhancement.
https://justmarkup.com/log/2015/02/26/cut-the-mustard-revisited/
Opt-in with a string or
capability testing
doesn’t work when
syntax is changed.
Which is a shame, as
some of the new
things in ES6 are really
handy!
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings
http://kangax.github.io/compat-table/es6/
ES6 support in the wild…
Most ES6
improvements help
huge projects, by
allowing for familiar
OO syntax, memory
optimisation and JS
becoming a compile
target.
http://typescriptlang.org/
By changing the
language in a drastic
fashion we are losing
some of the interop of
JavaScript in the
browser.
Transpiling is one way
to work around that –
and we see this with
CSS and HTML, too.
Another solution
would be to go back
to the world of script
types.
Maybe that’s
something worth
considering?
In any case, working
with JavaScript never
gets boring.
So, go and take part
in the discussions
happening now!
Thanks!
Chris Heilmann
@codepo8
http://christianheilmann.com

More Related Content

What's hot

The death of Silverlight, the triumph of HTML5, and the future of software de...
The death of Silverlight, the triumph of HTML5, and the future of software de...The death of Silverlight, the triumph of HTML5, and the future of software de...
The death of Silverlight, the triumph of HTML5, and the future of software de...
Judah Himango
 

What's hot (20)

Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutUpgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
 
Overboard.js - where are we going with with jsconfasia / devfestasia
Overboard.js - where are we going with with jsconfasia / devfestasiaOverboard.js - where are we going with with jsconfasia / devfestasia
Overboard.js - where are we going with with jsconfasia / devfestasia
 
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105 Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-web
 
What's next? J and beyond keynote 2015
What's next? J and beyond keynote 2015What's next? J and beyond keynote 2015
What's next? J and beyond keynote 2015
 
Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015
 
Making ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCoreMaking ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCore
 
NodeConfLondon - Making ES6 happen with ChakraCore and Node
NodeConfLondon - Making ES6 happen with ChakraCore and NodeNodeConfLondon - Making ES6 happen with ChakraCore and Node
NodeConfLondon - Making ES6 happen with ChakraCore and Node
 
Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015
 
The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017
 
Progressing JavaScript and Apps the Web way…
 Progressing JavaScript and Apps the Web way…  Progressing JavaScript and Apps the Web way…
Progressing JavaScript and Apps the Web way…
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date.
 
The wheel is spinning but the hamster is almost dead - Smartweb 2015
The wheel is spinning but the hamster is almost dead - Smartweb 2015The wheel is spinning but the hamster is almost dead - Smartweb 2015
The wheel is spinning but the hamster is almost dead - Smartweb 2015
 
Fixing web and JS gaps
Fixing web and JS gapsFixing web and JS gaps
Fixing web and JS gaps
 
PC/Mac/Linux: Multi-platform web development made simple
PC/Mac/Linux: Multi-platform web development made simplePC/Mac/Linux: Multi-platform web development made simple
PC/Mac/Linux: Multi-platform web development made simple
 
Making ES6 available to all with ChakraCore and Typescript
Making ES6 available to all with ChakraCore and TypescriptMaking ES6 available to all with ChakraCore and Typescript
Making ES6 available to all with ChakraCore and Typescript
 
Progressive Web Apps – the return of the web? Goto Berlin 2016
Progressive Web Apps – the return of the web? Goto Berlin 2016Progressive Web Apps – the return of the web? Goto Berlin 2016
Progressive Web Apps – the return of the web? Goto Berlin 2016
 
The death of Silverlight, the triumph of HTML5, and the future of software de...
The death of Silverlight, the triumph of HTML5, and the future of software de...The death of Silverlight, the triumph of HTML5, and the future of software de...
The death of Silverlight, the triumph of HTML5, and the future of software de...
 
Flourish2011
Flourish2011Flourish2011
Flourish2011
 
Meteor Day - Nov 6 at La Commune
Meteor Day - Nov 6 at La CommuneMeteor Day - Nov 6 at La Commune
Meteor Day - Nov 6 at La Commune
 

Similar to Advancing JavaScript without breaking the web - MunichJS

Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...
Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...
Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...
Ontico
 

Similar to Advancing JavaScript without breaking the web - MunichJS (20)

Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
 
Real solutions, no tricks
Real solutions, no tricksReal solutions, no tricks
Real solutions, no tricks
 
A Period of Transition
A Period of TransitionA Period of Transition
A Period of Transition
 
5 java script frameworks to watch in 2017
5 java script frameworks to watch in 20175 java script frameworks to watch in 2017
5 java script frameworks to watch in 2017
 
Top 10 Front End Development Technologies to Focus in 2018
Top 10 Front End Development Technologies to Focus in 2018Top 10 Front End Development Technologies to Focus in 2018
Top 10 Front End Development Technologies to Focus in 2018
 
GWT Reloaded
GWT ReloadedGWT Reloaded
GWT Reloaded
 
emerging
emergingemerging
emerging
 
emerging
emergingemerging
emerging
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Top 10 java script frameworks for 2020
Top 10 java script frameworks for 2020Top 10 java script frameworks for 2020
Top 10 java script frameworks for 2020
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)GWT - AppDays - (25 aprile 2014, pordenone)
GWT - AppDays - (25 aprile 2014, pordenone)
 
What is the best java script frameworks to learn?
What is the best java script frameworks to learn?What is the best java script frameworks to learn?
What is the best java script frameworks to learn?
 
Top 10 web development tools in 2022
Top 10 web development tools in 2022Top 10 web development tools in 2022
Top 10 web development tools in 2022
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
How backbone.js is different from ember.js?
How backbone.js is different from ember.js?How backbone.js is different from ember.js?
How backbone.js is different from ember.js?
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
 
Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...
Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...
Исполнение JS на сервере при масштабировании - что может пойти не так, Brian ...
 
Developers survival-guide
Developers survival-guideDevelopers survival-guide
Developers survival-guide
 

More from Christian Heilmann

The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)
Christian Heilmann
 

More from Christian Heilmann (20)

Develop, Debug, Learn? - Dotjs2019
Develop, Debug, Learn? - Dotjs2019Develop, Debug, Learn? - Dotjs2019
Develop, Debug, Learn? - Dotjs2019
 
Hinting at a better web
Hinting at a better webHinting at a better web
Hinting at a better web
 
Taking the "vile" out of privilege
Taking the "vile" out of privilegeTaking the "vile" out of privilege
Taking the "vile" out of privilege
 
Seven ways to be a happier JavaScript developer - NDC Oslo
Seven ways to be a happier JavaScript developer - NDC OsloSeven ways to be a happier JavaScript developer - NDC Oslo
Seven ways to be a happier JavaScript developer - NDC Oslo
 
Artificial intelligence for humans… #AIDC2018 keynote
Artificial intelligence for humans… #AIDC2018 keynoteArtificial intelligence for humans… #AIDC2018 keynote
Artificial intelligence for humans… #AIDC2018 keynote
 
Killing the golden calf of coding - We are Developers keynote
Killing the golden calf of coding - We are Developers keynoteKilling the golden calf of coding - We are Developers keynote
Killing the golden calf of coding - We are Developers keynote
 
Progressive Web Apps - Techdays Finland
Progressive Web Apps - Techdays FinlandProgressive Web Apps - Techdays Finland
Progressive Web Apps - Techdays Finland
 
Taking the "vile" out of privilege
Taking the "vile" out of privilegeTaking the "vile" out of privilege
Taking the "vile" out of privilege
 
Five ways to be a happier JavaScript developer
Five ways to be a happier JavaScript developerFive ways to be a happier JavaScript developer
Five ways to be a happier JavaScript developer
 
Taking the P out of PWA
Taking the P out of PWATaking the P out of PWA
Taking the P out of PWA
 
Sacrificing the golden calf of "coding"
Sacrificing the golden calf of "coding"Sacrificing the golden calf of "coding"
Sacrificing the golden calf of "coding"
 
You learned JavaScript - now what?
You learned JavaScript - now what?You learned JavaScript - now what?
You learned JavaScript - now what?
 
Sacrificing the golden calf of "coding"
Sacrificing the golden calf of "coding"Sacrificing the golden calf of "coding"
Sacrificing the golden calf of "coding"
 
Progressive Web Apps - Covering the best of both worlds - DevReach
Progressive Web Apps - Covering the best of both worlds - DevReachProgressive Web Apps - Covering the best of both worlds - DevReach
Progressive Web Apps - Covering the best of both worlds - DevReach
 
Progressive Web Apps - Covering the best of both worlds
Progressive Web Apps - Covering the best of both worldsProgressive Web Apps - Covering the best of both worlds
Progressive Web Apps - Covering the best of both worlds
 
Non-trivial pursuits: Learning machines and forgetful humans
Non-trivial pursuits: Learning machines and forgetful humansNon-trivial pursuits: Learning machines and forgetful humans
Non-trivial pursuits: Learning machines and forgetful humans
 
Progressive Web Apps - Bringing the web front and center
Progressive Web Apps - Bringing the web front and center Progressive Web Apps - Bringing the web front and center
Progressive Web Apps - Bringing the web front and center
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
 
Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017
 
The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscaping
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 

Advancing JavaScript without breaking the web - MunichJS

Editor's Notes

  1. Today I want to talk about a challenge we are facing: we want to advance JavaScript, but it seems we can not do so without breaking the web.
  2. JavaScript is a massive success when it comes to developer adoption and distribution. It is found everywhere these days. Whilst in the beginning it was only used to add flashy bits to web sites and prevent a page reload, you now can find it in browsers, hardware, servers and many other places. The reason is its forgiving nature.
  3. This, of course is also one of its main issues. To someone coming from stricter development environments and languages JavaScript can look flimsy and badly designed and it is easy to say it is not up to the job of large applications. The same is said about PHP all the time. When a language is flexible enough to be implemented in various environments, it is easy to discredit it compared to “proper” languages.
  4. Which, to me, is a “No shit, Sherlock” moment. You can not compare a language that wasn’t designed for a certain task but gets used because of its appeal to one that was designed for the task. JavaScript’s big benefit is its flexibility and that it allows anyone to take part. The low learning curve is what made it what it is today.
  5. That said, we do use JavaScript for ridiculously complex things these days. Which means we should have a go at improving the language in terms of memory allocation, security and readability for people not versed in it.
  6. The problem is that we need to do this without breaking what is already out there, and without making people dependent on one environment. JavaScript is a success because it is independent of browser and development stack.
  7. We will never have a world where every user has one browser or an evergreen environment. Once we put something out on the web, it is there and the more it gets distributed, the harder it is to remove. Saying all your users need a certain browser is a silly argument. It is not using the web to its strengths.
  8. One thing we started to do when moving JavaScript to the server and in other environments that need more control is to introduce strict mode. This one disallows for some of the laxities of JavaScript and results in more predictable code. The way to make that work is by simply adding ‘use strict’ to your code – either for a whole document, or only for one method or function in it.
  9. There is a massive movement now to innovate on top of JavaScript. And every creator of browsers, JavaScript engines or any other consumer of JS has great ideas.
  10. Google, for example seems to be working on SoundScript and SaneScript.
  11. The work in progress way to trigger SaneScript is to create an opt-in called “use sanity”. But why stop there?
  12. In the past, innovating in the browser wasn’t hard. All we need to do is to test for the support of new objects or methods and we’re safe. Browsers that don’t support what we have will not get it and we treat it as an enhancement.
  13. Using a few tests, we can block out the browsers that don’t understand what we are trying to achieve.
  14. This technique is upgradeable, as this example shows.
  15. You can even nest that and create various versions of support. All without having to worry about backwards compatibility and non-supporting environments will never get bothered with technology they don’t understand.
  16. Almost. The issue with us innovating JS right now is that we mess around with its syntax. And that’s something you can’t really test for. JavaScript is not forgiving like HTML or CSS – when there is a syntax error, the JS engine gives up trying to compute the rest of our scripts.
  17. Template strings for example allow us to use multi-line strings and in-string replacement without concatenation. This makes our markup generation much terser and cleaner and less error prone. Of course, the even better way for this would be templates in HTML, but that’s another presentation.
  18. One of the “err, what?” moments of JavaScript for people not familiar with the language is the need for a lot of anonymous functions and scoping. This can make code look bloated and unoptimised.
  19. Arrow functions work around that issue and with their more lexical nature avoids having to keep scope in a that=this hack.
  20. The issue is though, that to date, the support for ES6 isn’t that good. Red in this support grid means not supported. And it would be naïve to expect this to change any time soon and all the browsers on all the platforms to get an upgrade to support ES6.
  21. A lot of the changes we do to the language now are needed for porting products and moving JavaScript to the larger world of large projects. Therefore it would be dangerous to let browser limitations stop us.
  22. It makes more sense to have a conversion step. TypeScript was a good start for this.
  23. Babel allows us to write ES6 and get it converted into ES5 JavaScript for browsers now. You even have a live console to see the code it generates, which is great for learning it.
  24. Back in the long, long ago, IE had its own JavaScript version called Jscript. By adding a type of text/jscript to the script block you could use this without bothering other browsers. As browsers don’t render script nodes of a type they don’t understand, we also used this for HTML templating before <template>
  25. A type of es6 would allow browsers that don’t understand it to skip and others to execute.