[aklug] Re: Ruby code blocks

From: barsalou <barjunk@attglobal.net>
Date: Sun May 30 2010 - 10:30:15 AKDT

Quoting Michael Fowler <michael@shoebox.net>:

> On Sat, May 29, 2010 at 06:56:39PM -0800, barsalou wrote:
>> I'm not sure of the use case for storing code in a hash, seems fraught =20
>> with opportunity.
>
> Storing references to code within a larger data structure is fairly
> common; it's one means of implementing a fast switch statement, and is
> called a dispatch table.
>
> I don't know Ruby, but I expect in order to accomplish it you would use
> the Proc module. Google should give good results on 'dispatch table'
> and 'closure'.
>

I can confirm this will produce great results because Giles Bowkett
and James Gray are two of the best in the Ruby biz.

"ruby dispatch tables"

Mike B.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun May 30 10:30:26 2010

This archive was generated by hypermail 2.1.8 : Sun May 30 2010 - 10:30:26 AKDT