Brainfade time - what's the proper name for a 'local' handler?

Richard Gaskin ambassador at fourthworld.com
Thu May 27 08:57:59 EDT 2010


Ian Wood wrote:

> I remember that one of the recent(ish) versions of Runrev introduced
> handlers that sit inside handlers and can only be called from within
> that handler, but what's the proper name so that I can look up how to
> use them?

In other languages like JavaScript and Scheme that sort of thing is 
referred to as a closure - here's an example from Wikipedia:

   // Return a list of all books with at least 'threshold' copies sold.
   function bestSellingBooks(threshold) {
     return bookList.filter(
         function (book) { return book.sales >= threshold; }
       );
   }

But I don't know of a way to even emulate closures in RevTalk (though it 
might be handy at times if we could).

The Engine Change Log included with the install covers changes back to 
v3.0, and I don't see anything there like this.

Can you recall more details about the feature you're thinking of?

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the Use-livecode mailing list