Matthew Smillie
12/9/2005 12:15:00 AM
On Dec 8, 2005, at 21:05, Daniel Sheppard wrote:
>> Given that the code below is functionally equivalent, what's
>> beneficial about using a lambda expression? It strikes me as a
>> requirement imposed by using the Functor class more than anything.
>>
>
> The class way is definitely the way to go, as it gives you easier
> flexibility. I was just in a lamdba mood at the time I wrote it and
> couldn't be bothered making it into a class.
>
> You might want to do this:
>
> class Flickr
> instance_methods.each {|x| remove_method(x) unless /__.*__/ === x }
> end
>
> To prevent any conflict between flickr methods and ruby object
> methods.
>
Good idea, since a conflict would break the whole thing.
Thanks again to you and Trans for the feedback.
matthew smillie.