Coffeeでconst
とかlet
が使えるか調べてみた。
結論
使えない。
正確に言うと「var
に変換されるconst
なんか無意味だ」と言って作者が実装しない。
- https://github.com/jashkenas/coffeescript/issues/2393 (短い議論)
- https://github.com/jashkenas/coffeescript/issues/3162 (長い議論)
That's precisely the sort of useless writing (especially when discarded by the runtime) that we're trying to avoid with CoffeeScript.
感想
Windows 8.1のサポートが切れるまでは、const
はBabelのアノテーションになりそう。(PCがターゲットのプロジェクトは)