You're right that coming up with language to describe what you want often doesn't pay back when you are limited to a single tool that works how it works.

But it pays back in spades when you are considering what you can do with different sets of tools. And it is indispensable when you're trying to design a tool.

In Perl 5 it practically isn't worth the bother to think, "Oh, I could do this with currying" - you just do it with a closure and avoid the extra step. But if you know how to think about what you're doing as currying, then when you use a language with good support for currying, you will have some notions on when to reach for that rather than writing it in Perl 5. Alternately if you are working in a language that without support for closures, but you understand that all you really want is currying, then you can figure out ways to simulate the simpler concept rather than trying to do full-blown closures.

Furthermore when it comes to designing tools, well have you read Perl 6 : Not Just For Damians? Take a look at the example of currying offered there. If Larry and Damian et al did not have language to discuss the idea of currying, would they ever have thought up such a nice way to do it?

So yes, learning about currying is completely useless to you in day to day Perl 5 programming. But concluding that it is therefore a useless concept is a fast way to fall into the "Blub Paradox". See Beating The Averages if you don't know what that is.


In reply to Re^6: Specializing Functions with Currying by tilly
in thread Specializing Functions with Currying by FoxtrotUniform

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.