KiScript
ECMAScript, kept simple.
Thesis
- Simple: Less magic.
- Strict: Less error-prone.
- Sweet: Allow syntax sugar.
- Functional: Classes are derived.
Specification
Based on ECMAScript 5.0, with reference to ECMAScript 6.0, and some customization.
Grammar Variation
- Lexical
- UTF-8 instead of UTF-16.
- No
/regex/
literal. - No
Keyword
asIdentifierName
. - No
.1
or1.
. - Allow multiple leading
0
s as decimal. \0
is alwaysNUL
inStringLiteral
.
- Syntactic
- No automatic semicolon insertion, so no restriction on no line terminator.
- No multiple or trailing
,
inArrayLiteral
. - No
in
orfor in
. - For each for
iterable
withfor ( : )
. - No
EmptyStatement
. Block
instead ofStatement
forif
/for
/while
/do while
body.- No trailing semicolon in
do while
.
- Language
- No primitive. (Refer to Python)