javascript : what is it really? and some new features in es6
Post on 22-Jan-2018
251 Views
Preview:
TRANSCRIPT
JSUHMMM..
JAVASCRIPT
@AayushShrestha
Co-Founder - LISHN
Head of Experience Design & Architecture -Viveka Health
fb.me/ShresthaAayush
aayushonweb@gmail.com
• What is JavaScript, really?
• What’s all the fuss about?
• ES6 / ES2015 / ECMAScript 2015
The world’s most
popular language.
POPULARITY STACK OVERFLOW VS GITHUB
STACK OVERFLOW TAG NAME TRENDS
RANKED BY # OF PROGRAMMING JOBS
The world’s most
unpopular language.
BRENDEN EICH
JAVA SCHEME SELF
LiveScript
JavaScript
ECMAScript
The web was a disappointment
as an application delivery
system in 2000s.
- Page replacement inefficient.
- Java Applets FAILED!
- Nobody believed in JavaScript.
The web is dead.
-People of early 2000
Microsoft
abandoned web.
AJAX
-JavaScript gets a second chance.
PLENTY OF REASONS TO HATE JAVASCRIPT
• It has bad parts. REALLY REALLY BAD PARTS.
• Slow execution.
• DOM is a headache.
• It’s not C, C#, Java, Python, Ruby….
• It does not go away.
JavaScript has
good parts.
That’s why you like it.
JavaScript is a functional
language with dynamic
objects and familiar syntax.
Scales from
beginners to masters.
Very effective in an event-
driven application model.
Programs can be significantly
smaller compared to equivalent
program in other languages.
Always evolving and
proving people wrong.
JAVASCRIPT IS EVERYWHERE
JAVASCRIPT IS EVERYWHERE
• Browsers
• Applications
• OS
• Databases
• Mobile
• Electronics
• Servers
— Jeff Atwood (2007)
Any application that can be written
in javascript, wil l eventually be
written in javascript
”
“ATWOOD’S LAW
Can JavaScript become
a better language?
YES!!
The most effective way is
to remove the bad parts.
DUH!!
Write code that not only
works, but looks correct too.
JS will become better if we use it
better.
ES2015
Faster. easier. Better.
MAIN GOALS OF ES6
• Fix (some of) ES5 issues
• Backwards Compatibility
• Modern Syntax
• Better suited for big applications
• New features
- Transpiler
- Converts future JS to working JS
Some
ES6/ES2015
Features
LET’S WRITE SOME ES6!
:)
LET
CONST
TEMPLATE STRINGS
CLASSES
CLASSES : INHERITANCE
CLASSES : GETTER/SETTER
ARROW FUNCTIONS
DESTRUCTURING
DESTRUCTURING
MORE COOL STUFFS
• Modules
• Promises
• Symbols
• Generators
• Map/Set Weakmap/Weakset
• More libraries and Core functions extension
REFERENCES
• David Crockford’s talk “Really. JavaScript”
• http://es6-features.org/
top related