JavaScript is simple









JavaScript is a junk language
Javascript is the product of a one-night stand between C and Self









Web services Performance test: Node beats Java


JavaScript open











Why resist some of the ES6 standards















ECMAScript 6



1. Class-inheritance looks beautiful





class MetaLanguage extends Language { constructor(x, y, z, version) { super(x, y, z); this.version = version; } summary() { return version; }}

Copy the code














Lisaac, for example, produces code almost as fast as C. The tests are derived from the Lisaac version of the MPEG-2 encoder, which is copied from a C language version. Tests showed that the Lisaac version was 1.9% slower than the C version, but had 37% fewer lines of code. C, however, is not an object-oriented language, but a procedural language. Lisaac is perhaps even more revealing than the C++ version.


— –
WiKi









Why do they say that object orientation has problems and discuss some drawbacks of object orientation






2. The new expression of function




let empty = ->; let square = (x) -> x * x; $("#shopping-chart").on('click', (event)=> this.customer.purchase(this.chart); ) ; [1, 2, 3].map{|x| x * x}; / / [1, 4, 9]

Copy the code






3. Some Java and Node module management





module DBLayer { export function query(s) { ... } export function connection(.. args) { ... } } import DBLayer.*; module CanvasLib = require('http://.. /canvas.js'); import CanvasLib.{Triangle, rotate};

Copy the code




















conclusion

Aim for minimalism, not minimalism
Stable, flexible, minimising grammatical constraints so as to combine free and varied uses,
Effectively control the complexity of the language






Thoughts on ECMAScript 6 and new syntax






Original address:ourjs.com


Did this article help you? Welcome to join the front End learning Group wechat group: