- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Tupling & currying
Sun, 2009-12-06, 20:42
In 2.7, the Function object had tupled and curried methods. There was
also a curry method on the Function class which did the same thing as
Function.curried. (I asked here in August if there was some reason for
the duplication and no one replied; I strongly suspect it was just an
oversight.)
In 2.8, the methods on the Function object are not needed anymore; Paul
Phillips has already deprecated them. We can just supply the class
methods instead.
I think "tupled" and "curried" are better names than "tuple" and
"curry". They read better. ("tuple" tends to read as the noun, when in
this case it's a verb.)
So I suggest that "curry" be deprecated and renamed to "curried", and
the "tuple" class method Paul just added a few days ago be renamed to
"tupled" (no deprecation needed since it's brand new).
I discussed this with Paul; he agrees with this change and is ready to
make it unless there is disagreement.
Mon, 2009-12-07, 12:37
#2
Re: Tupling & currying
For the record, I should point out that it's not just that I'm willing
to make the change, but I would have preferred tupled and curried from
the outset. I named tuple tuple because curry was already there, and I
didn't prefer the adjectival forms sufficiently to advocate for
deprecating the oldish functionN method "curry" in favor of "curried".
But as long as Seth is being persistent about it (which I applaud) I may
as well throw my hat CLEARLY in the ring alongside the -ed names.
Look over there, by tupled and curried! No, inside the ring! Is that...
paulp's hat? It IS!
Donna
On Sun, Dec 6, 2009 at 8:43 PM, Seth Tisue <seth@tisue.net> wrote: