Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Well, with Data::Flow, which I maintain, you use rules (or as Ilya calls them, recipies), to define, how hash keys are generated.

One important thing I would like to see out of any such efforts in Perl is that the rules should be invertable. For example, if you go through a series of steps to turn input into output, then given the output, you should be able to chain backwards and re-generate the input.

The language currently compiling on my macosx ibook right now is the language used to place 4th in the International Conference on Functional Programming Contest. It is both logical and functional and is called Mercury It has a short tutorial and I think you will find it's description appealing. Both first and second place were taken by CAML (from inria.fr --- I lost interest in this langauge when I saw it was not purely functional or logical but also contained imperative elements.) And 3rd place was taken by a team working in Haskell a purely functional language.

Also, Perl 6 is planned to have additional functional capability. And finally, what you have above is known as an Agenda design pattern and was described in the article "Design Patterns" in The Perl Journal a few issues before it's first crucifixion (TPJ will rise from the dead right?!)


In reply to Re: Rules-based Perl? by princepawn
in thread Rules-based Perl? by Masem

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (13)
    As of 2014-09-16 17:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (39 votes), past polls