Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Kudos for writing this introduction!

Purpose: Depending on that the purpose of this is -- to learn Perl programmers to program in Haskell or learn Perl programmers Haskell's techniques -- different comments will follow. Perhaps you should state the purpose of the document clearly in the -1 chapter, other than that it may be interesting?

Density: As always with introductions it's hard to make everyone happy. I was happy as it was a quick re-cap for me as I already know basic Haskell. But I think it may be a bit too dense for the average Perl programmer, especially with the strange syntax.

Syntax: A function call in Haskell looks quite differently and the precedence is different too. As you have in your example, factorial n = n * factorial (n - 1). Those parenthesis there are unnecessary to a Perl programmer. Also, two-argument functions don't use commas, which also look strange to a Perl programmer. A paragraph on the key differences in syntax may be worth its space, and then you can move the comment about the significant indenting to a more logical place. Idealy, you wouldn't have to spend time on explaining syntax, but I think that's can't be avoided successfully.

Useful tools: I liked learning Haskell because it gave me some new cool ideas about programming languages and tools I'd like to be able to use in Perl. I think that a document like this should focus the most on parts of Haskell that may be truly hands-on useful to Perl programmers and explain other parts just enough to make the Perl relevant parts understandable. Hopefully, this will get Perl programmers even more interested in Haskell as they see applications of what they read here. Depending on your purpose you could perhaps retitle it to "Haskell idioms/design patterns in Perl" or write a sister document called that?

Perl examples: Perhaps every Haskell example could be accompanied with a Perl translation, or something that goes as close as possible? That way Perl programmers may more easily relate to the Haskell code.

Hope I've helped,
ihb


In reply to Re: RFC: A Perlesque Introduction to Haskell, Part One (draft) by ihb
in thread RFC: A Perlesque Introduction to Haskell, Part One (DRAFT) 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, 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
  • 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.
  • 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 having an uproarious good time at the Monastery: (3)
    As of 2020-02-26 06:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What numbers are you going to focus on primarily in 2020?










      Results (113 votes). Check out past polls.

      Notices?