I go through the vow documentation and use syntax in several places
var myVar = new(MyFunction);
eg.
var promise = new(events.EventEmitter);
I am familiar with new MyFunction()and new MyFunction(and yes, I read this question ). But the syntax above is, well, new to me - it looks like a function call, although I suspect it's just new MyFunctionwith some brackets added. Is there any difference between these uses new? If not, is there a good argument for using one or the other? I would have thought that I new MyFunction()was the most discriminating.
Sorry if this is a duplicate - I searched, but could not find it.
source
share