Probably not comprehensive, and in no particular order...
feature name | example | include? |
---|---|---|
string interpolation | “a#{b}” | Y |
assignment | a = b | Y |
single-line comment | # comment | Y |
integer literal | 1 | Y |
decimal literal | 1.1 | Y |
boolean literal | true/false | Y |
parentheses for grouping | (a or b) and c | Y |
logical operators | and/or/not/&&/||/! | Y |
comparison operators | />=/==/!=/is/isnt | Y |
member access | a.b | Y |
dynamic member access | a[b] | Y |
explicit function application | a(b, c) | Y |
indentation introduces blocks | if a <\n> <indent> b | Y |
`then` introduces block | if a then b | Y |
@-vars | @a | Y |
unary existential operator | a? | Y |
conditional execution | if a then b | Y |
conditional else clause | if a then b else c | Y |
negated flow control keywords | unless/until | Y |
in operator | a in b | Y |
of operator | a of b | Y |
instanceof operator | a instanceof b | Y |
negated infix operators | not in, not of, not instanceof | Y |
for-in | for v, k in a then e | Y |
for-of | for k, v of o then e | Y |
filtered loops via when | for a in b when c then d | Y |
own keyword for hasOwnProperty filter | for own k of o then c | Y |
single-line function literals | (a, b) -> c | Y |
parameter-less functions | -> a | Y |
multi-line function literals | -> <\n> <indent> a | Y |
maths operators | /, +, -, %, * | Y |
array literals | [a, b] | Y |
explicit object literals | {a: b} | Y |
{pre,post}fix {in,de}crement | --a, a--, ++a, a++ | Y |
unary +/- | +a, -a | Y |
explicit return | return 0 | Y |
unconditional loop | loop then a | Y |
break/continue | loop then break | Y |
classes | class A | Y |
class-extends | class A extends B | Y |
class proto-assignments | class A then m: -> | Y |
extends operator | A extends B | Y |
switch-when-else | switch a <\n> when b then c | Y |
try-catch | Y | |
throw operator | throw a | Y |
new operator | new A | Y |
semicolons as seq operator | a; b | Y |
string literals | “a” | Y |
string hex escapes | “\x61” | Y |
string character escapes | “\n” | Y |
string line continuation | “<\n>a” | Y |
regex literals | /a/ | Y |
do operator | do a | Y |
slices | a[b..c] a[b...c] | Y |
unbounded slices | a[b...] a[..b] | Y |
undefined -> void 0 | undefined | Y |
null literal | null | Y |
compound assignment | a <binary-op>= b | N |
boolean aliases | yes/no/on/off | N |
exponential notation | 1.2e+4 | N |
bitwise operators | &/|/^/~/<</>>/>>> | N |
soaked member access | a?.b | N |
dynamic soaked member access | a?[b] | N |
binary existential operator | a ? b | N |
implicit function application | a b, c | N |
proto-member access | a::b | N |
dynamic proto-member access | a::[b] | N |
@ as alias for this | @ | N |
soaked function application | a?(b, c) | N |
while loop | while a then b | N |
postfix flow control | a if b, c until d | N |
inclusive ranges | [a..b] | N |
exclusive ranges | [a...b] | N |
bound function literals | => | N |
object key-omission shorthand | {a} | N |
implicit object literals | a: b | N |
(splat/rest)-params | (a...) -> | N |
@-params | (@a) -> | N |
named destructuring assignment | {a: b} = c | N |
positional destructuring assignment | [a, b] = c | N |
splat/spread arguments | fn a... | N |
chained comparison | a < b < c | N |
super | super | N |
super with arguments | super a | N |
external constructors | class A then constructor: c | N |
try-catch-finally | N | |
try-finally | N | |
try | try a | N |
typeof operator | typeof a | N |
continue lines ending in binary operator | a and <\n> b | N |
backslash continues lines | a \ <\n> + b | N |
triple-quoted strings | “””<\n> a<\n>””” | N |
heregexen | /// a /// | N |
ACI in multiline array/object literals | [a<\n>b] | N |
shallow copy of array | a[..] | N |
splices | a[b..c] = d | N |
unbounded splices | a[b...] = c | N |
javascript literals | `javascript` | N |
block comments | ### comment ### | N |
default parameters | (a = b) -> | N |