Re: es-discuss Digest, Vol 82, Issue 95

2013-12-25 Thread raul mihaila
@Alex Kocharin: I would't call the functions like time. It was only a very simple example. Often my functions would be called from outside so I wouldn't be able to pass the values. Also the main reason I want this is for optimizations, so as you pointed out, can't use the ugly with. On Tue, Dec

Re: es-discuss Digest, Vol 82, Issue 95

2013-12-25 Thread Alex Kocharin
 If you're looking for optimizations, nested closures is not a place where you generally want to be. Create a function out of the scope and call it with all needed variables since function calling is cheap nowadays, and arguments already behave the way you're describing.  25.12.2013, 15:29, "raul