Re:Koa – Next-generation web framework for Node.js
by filearts on Thursday December 19, 2013 @11:06AM
(#6935469)
If you forget to type a 2nd '=', putting a constant as the left-hand-side will allow the runtime to error instead of treating the expression like an accidental assignment with potentially disastrous side-effects.
[ Parent
| on HN ]
Re:Koa – Next-generation web framework for Node.js
by stevehawk on Thursday December 19, 2013 @12:38PM
(#6936217)
it goes back further than this..
in compiled languages it is a compile time error. So you don't run through 1/2 of your application before you run into it. Instead it shows up as soon as you run make/gcc/g++/etc.
Re:Koa – Next-generation web framework for Node.js
by jaegerpicker on Thursday December 19, 2013 @12:23PM
(#6936104)
In some languages sometimes but in general I think that's the use case for yoda code.