in reply to C to Perl API implementation problems

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...

  • Comment on Re (tilly) 1: C to Perl API implementation problems