Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Babel is a JavaScript compiler.Use next generation JavaScript, today.
日記(2) 音声処理(0) ActionScript(1) Brainf*ck(0) C(0) C++(0) C#(3) Javascript(5) Lua(0) PHP(1) Pascal(0) VerilogHDL(0) Dart(1) Kuin(2) JavaScriptを記述する上で、避けて通れないのが非同期処理。 人類は、長い年月、この非同期的な処理を「如何にして書きやすく、読みやすく記述するか」について探求してきました。 要するに†闇†の塊なのですね。(闇に飲まれよ!!!!) この物語は、そんな†闇†の存在だった非同期処理を、人類がどのように苦しみ、そしてどのように解決していったかを書いていくポエムである。 補足:厳密には、JSはシングルスレッドで動くため、非同期処理は存在しない!と言ってしまえばそこまでなのですが、今回はsetTimeoutやaja
node.js を代表とする JavaScript を用いた非同期プログラミング環境においては、コーディングパターンのベストプラクティスが共有されておらず、結果として品質の低いコードが多くなるという問題があるように思います。そこで、特にエラー処理をどう書くべきか、既存のライブラリを使う方法を紹介してみることにしました。 いきなりですが、ファイルの文字数を返す関数を作ることを考えてみます。Java だと以下のような感じになるでしょうか。countChars メソッドに注目すると、エラーを例外として扱っていて、モジュラーかつ簡潔になっていることがわかります。 class FileCounter { static long countChars(String filename) throws IOException { FileInputStream is = new FileInputStre
Microsoft Developer Blogs Get the latest information, insights, and news from Microsoft. AI agents are quickly moving from experiments to production‑critical components of modern applications. But while many teams know how to build agents, far fewer are confident they’re hosting them on the right foundation. Most organizations start by deploying agents the same way... We're shipping two major capa
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く