3 ms·
If your function is simple enough, it pays to define it inline. It's the same with array literals and dictionary literals. What would you rather? somefn( {
by hasenj 16y ago
If your function is simple enough, it pays to define it inline.
It's the same with array literals and dictionary literals.
What would you rather?
somefn( {a: 10, b : 20} )
or:
dict = new Dictionary()
dict[a] = 10
dict[b] = 20
somefn(dict)
The inline case is clearly a win.