3 ms·
>Is Closure(function ... end) really an improvement over the normal IIFE look of (function ... end)()? Now that you say it.. no, it's not. Changed.
by copx 13y ago
>Is Closure(function ... end) really an improvement over the normal IIFE look of (function ... end)()?
Now that you say it.. no, it's not. Changed.
- pygy_ 13y agoBetter still: do local move = { [Direction.up] = View.Up, [Direction.left] = View.Left, [Direction.right] = View.Right, [Direction.down] = View.Down } function View.move(self, direction) move[direction](self) end end