ECMA Script 4 最终草案公布了
程序员文章站
2022-03-31 14:52:56
...
ECMAScript 4版本的最终草案公布了,下载地址是:
http://www.ecmascript.org/es4/spec/overview.pdf
ES4修改了ES3的一些bug,提高了对于正则表达式和unicode支持,提高了更多丰富的语法特性和类库API支持,其中比较有趣的特性有:
* Generic functions: generic function intersect(s1: Rect, s2: Rect) {}
* Let const: let const color = 0xFEFEFE
* Namespaces: namespace ns3 = “www.ecma-international.org”
* “like”: var v: like { x: int, y: int }
* Packages: package org.ecmascript.experiment { internal var v; }
* Program units: use unit URLParser “http://www.mycompany.com/lib/URLParser”
* For in: for ( i in obj ) print(i)
http://www.ecmascript.org/es4/spec/overview.pdf
ES4修改了ES3的一些bug,提高了对于正则表达式和unicode支持,提高了更多丰富的语法特性和类库API支持,其中比较有趣的特性有:
* Generic functions: generic function intersect(s1: Rect, s2: Rect) {}
* Let const: let const color = 0xFEFEFE
* Namespaces: namespace ns3 = “www.ecma-international.org”
* “like”: var v: like { x: int, y: int }
* Packages: package org.ecmascript.experiment { internal var v; }
* Program units: use unit URLParser “http://www.mycompany.com/lib/URLParser”
* For in: for ( i in obj ) print(i)
上一篇: 算法复习15
下一篇: 利用metplotlib画2个不同的图像