View Single Post
  #7  
Old 12-12-2009, 02:09 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by WhiteDragon View Post
It is a junk variable because I create it, and only use it one time.
Maybe you could reuse it for the next time you need an anonymous function!!

Quote:
Any C-like language with support for closures/anonymous functions. Try ECMAScript (JavaScript, ActionScript, QtScript, Objective-J), or PHP.
Man, I want to agree with this thread on principle, but after you calling PHP C-like, I really just want to punch you in the face with a monoid in the category of endofunctors.

Worth adding that lua has the almost the same syntax except without the curly braces because not having curly braces there is what lua does, C# has almost the same syntax except with delegate instead of closure because calling something anonymous a function scares OOP programmers, etc. Perl has the same kind of feature except without a parameter list and yet another keyword.

Quote:
All the functional languages such as Haskell, Erlang, LISP, and Scheme also allow defining the function inline, so the concept is not bogus either.
With GS2 basically looking like Javascript, that is the only comparison there is. If people feel that adding Javascript's syntax for anonymous functions is not worth it, comparing to even crazier languages is not going to help, I suspect.
Reply With Quote