Basic unit type:
λ> replTy "()"
() :: ()Basic functions:
Basic unit type:
λ> replTy "()"
() :: ()Basic functions:
| # 私が考える安全なプログラムを書くために必要なこと | |
| 今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
| - ファイルを開こうとしたらコマンドを実行できてしまったり | |
| - CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
| - SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
| こういったときに | |
| - 入力値検証をしないと危険になる |
Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan
Translated by Yuta Okamoto (@okapies)
| function Class (bar) { | |
| this.foo = bar; | |
| } | |
| Class.prototype.method = function () { | |
| return this.foo; | |
| }; | |
| var instance = new Class('baz'), | |
| func = instance.method; |
apply(), call() の理解が足りない。| import qualified VM as V | |
| import qualified Text.Parsec as P | |
| import Control.Applicative ((<|>), (<$>)) | |
| import qualified Control.Monad.State as S | |
| import qualified Data.Map as M | |
| import Data.Maybe (fromJust) | |
| data Intermediate = Comment String | |
| | Inst V.Instruction | |
| | Paramdef String |