Quote:
Originally Posted by Skyld
It is not really a junk variable because when you define a function normally, you are still creating a variable which contains the function object without realising it.
|
It is a junk variable because I create it, and only use it one time.
Quote:
Originally Posted by Skyld
In any other case, what other language uses that kind of syntax that you suggested?
|
Any C-like language with support for closures/anonymous functions. Try ECMAScript (JavaScript, ActionScript, QtScript, Objective-J), or PHP.
All the functional languages such as Haskell, Erlang, LISP, and Scheme also allow defining the function inline, so the concept is not bogus either.