S
Stoyan
Moving a discussion from twitter... Let's name this pattern
Some ideas include:
- self-executing function
- immediate function
- immediate invokation
- lexical block
Some thoughts:
@cowboy: IMO self-executing: function foo(){ foo(); }; Immediately
invoked: (function(){ ... })();
@abozhilov: I think that pattern need more abstract name. The
intention of pattern instead technical terms. and `(function (){})()`
is just one possibility for implementation these purposes.
@kangax: "immediate function" sounds a little awkward to me but
with "invocation" it's fine — "immediate invocation"
@DmitrySoshnikov no less than "self-executing". This term maybe fits
to recursive function, because exactly it executes itself. Immediate
invocation fits better for (correct naming) - an (anonymous) FE which
executes (by the engine, but not itself) right after its creating.
"Immediate function" seems apt, meaning "Immediate invocation of a FE
right after FE's creation".
Opinions?
Some ideas include:
- self-executing function
- immediate function
- immediate invokation
- lexical block
Some thoughts:
@cowboy: IMO self-executing: function foo(){ foo(); }; Immediately
invoked: (function(){ ... })();
@abozhilov: I think that pattern need more abstract name. The
intention of pattern instead technical terms. and `(function (){})()`
is just one possibility for implementation these purposes.
@kangax: "immediate function" sounds a little awkward to me but
with "invocation" it's fine — "immediate invocation"
@DmitrySoshnikov no less than "self-executing". This term maybe fits
to recursive function, because exactly it executes itself. Immediate
invocation fits better for (correct naming) - an (anonymous) FE which
executes (by the engine, but not itself) right after its creating.
"Immediate function" seems apt, meaning "Immediate invocation of a FE
right after FE's creation".
Opinions?