Who will be using this module?

What will they be using it for?

If you will be tossing new Perl people at the API who have never used the original, then you should definitely create as natural an API as you can.

If you will be tossing people who are used to the old implementation of the API at the new, then there are good reasons to stick, at least in spirit, to the old.

If you are going to spend a lot of time translating code from one language into another, making the correspondence fairly direct is probably a good idea.

And you can always create a Perlish wrapper around something that you don't want to personally use.

All that said, your actual suggestions for what to do with the API seem quite reasonable to me. What I would suggest is that you should create the smallest API that is convenient at the moment, and then start on the real work, adding things as they come up. Probably your length method would never happen. Your error mode probably will. And for things that are not very clear-cut, you will probably find a practical balance between what you need and what you can leave out...


In reply to Re (tilly) 1: C to Perl API implementation problems by tilly
in thread C to Perl API implementation problems by OeufMayo

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.