いま思い出した論点
- JSでエラー処理どうしてる?
- カスタムError(Errorの継承)ってクロスブラウザきつくないですか?
- Error投げてると、非同期のsetTimeoutとかで吸収されちゃってつらくないですか?
- それブラウザの話?Nodeの話?
- そもそもブラウザJSで例外、エラーってどんなものがある?
- Promiseのエラー処理ベストプラクティスとは?
#!/bin/sh | |
sudo apt-get install fontforge fonts-inconsolata | |
mkdir -p ~/.fonts | |
TMPDIR=$(mktemp -d /tmp/ricty-XXXXX) | |
cd $TMPDIR | |
wget http://iij.dl.sourceforge.jp/mix-mplus-ipa/59022/migu-1m-20130617.zip |
var fs = require('fs'); | |
var TS = require('typescript-simple').TypeScriptSimple; | |
var cs = require('coffee-script'); | |
var tss = new TS({noImplicitAny: true}); | |
var sample1 = fs.readFileSync('./sample1.ts', {encoding: 'utf8'}); | |
var sample2 = fs.readFileSync('./sample2.ts', {encoding: 'utf8'}); | |
// warm up | |
var start = new Date().getTime(); |
/// <reference path="typings/node/node.d.ts" /> | |
/// <reference path="typings/typescript/typescript.d.ts" /> | |
import ts = require("typescript"); | |
import fs = require("fs"); | |
import path = require("path"); | |
function transform(contents: string, libSource: string, compilerOptions: ts.CompilerOptions = {}) { | |
// Generated outputs | |
var outputs = []; |
2015/01/15時点の情報です。
v0.1.3が計画されてるけど、initial releaseのv0.1.0からはbugfixや細かな修正がほとんどで、大きな進化はしてない。 コミットもあまり活発ではない。 もしかしたら、Facebook社内でprivateブランチを育てていてまとまったところで出してくるのかも。 (JS等に比べて)開発者人口の少ないOCaml実装というのも、プルリクが集まりにくくOSS的な加速的進化が起きにくい原因かもしれない。
この前のブログ記事見た人はごめん。
どこが間違ってるか分かります?
✘ proper tail calls (tail call optimisation) | |
▼ arrow functions | |
✘ 0 parameters | |
✘ 1 parameter, no brackets | |
✘ multiple parameters | |
✘ lexical "this" binding | |
✘ "this" unchanged by call or apply | |
✘ can't be bound, can be curried | |
✘ lexical "arguments" binding | |
✘ no line break between params and => |
[ | |
{ | |
"browser_version": "11.1", | |
"device": null, | |
"browser": "opera", | |
"os_version": "Mavericks", | |
"os": "OS X" | |
}, | |
{ | |
"browser_version": "11.6", |