A few thoughts ...

Regarding the naming, since Prototype provides bind, I can see how
"curry" might be confusing. Bind essentially allows you to curry this
(plus args, if you want), while "curry" allows you to defer binding
this while still currying args. So introducing a whole new name here
sort of makes sense. This is really FP applied to OOP, which is a
tricky area.

The use case for "rcurry" (the naming here was inspired by the ?trim
family of string functions, which I've also added to my Prototype
extensions) comes up more often than you might expect and is another
example of how the "pure" FP stuff runs into some snags in the real
world. Anytime you have a binary function that is not commutative, a
straight-up curry operation won't work. I can provide some examples if
that would help, but the bottom line is that, at least in my
experience, I end up using rcurry as often as I do curry.

I think following the Perl folks is a good idea - I am sure they've
thought alot about this already. My only question, not being a Perl
guy, is whether or not they also have the equivalent of bind? That is,
are we really following them here or just confusing people by using
the same name for slightly different thing?

Finally, not to throw a monkey wrench into the works, I also found
myself experimenting with an entirely different approach to this
problem: introducing a Method class. I will put that in a separate
thread, though. :-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to