View Single Post
  #6  
Old 12-12-2009, 02:31 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Skyld View Post
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 View Post
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.
Reply With Quote