View Single Post
  #1  
Old 11-29-2009, 09:07 PM
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
Function Closures

Inline Closures
These would be useful to make code a bit cleaner:
PHP Code:

foobar
(function (temp.atemp.b) {
  return 
temp.temp.b;
}); 

In-place Execution
This would be useful for proper scoping (since we don't have block scope):
PHP Code:

temp
.= function () {
  
temp.foo 3;
  
temp.bar 50;
  
temp.baz 4;
  return 
temp.foo temp.bar temp.baz;
}(); 
Reply With Quote