Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^9: More comprehensive style guide for Perl docs than perlpodstyle?

by eyepopslikeamosquito (Chancellor)
on Jan 08, 2019 at 10:51 UTC ( #1228197=note: print w/replies, xml ) Need Help??


in reply to Re^8: More comprehensive style guide for Perl docs than perlpodstyle?
in thread More comprehensive style guide for Perl docs than perlpodstyle?

As an aside, I gave split as an example of a function with a poor interface. It never occurred to me that anyone would attempt to defend it as a fine example of flawless API design - just as I didn't expect anyone to defend (the awful) interface provided by ANSI C strtok function when writing On Interfaces and APIs.

Though I'm able to use both split (in Perl) and strtok (in C), I sometimes roll on the floor laughing at how bad their interfaces are. And yet their designers were very smart people ... which is the second point I wanted to make, namely that good API design is a genuinely hard problem.

On Interfaces and APIs quotes Joshua Bloch's seven characteristics of a good API:

  1. Easy to learn.
  2. Easy to use, even without documentation.
  3. Hard to misuse.
  4. Easy to read and maintain code that uses it.
  5. Sufficiently powerful to satisfy requirements.
  6. Easy to extend.
  7. Appropriate to audience.
In your opinion, how does Perl's split function measure up to the seven criteria above?

I said Guido "solved" the problem for Python by dumbing down split. By putting the word "solved" in quotes, along with "dumbing down", I meant to indicate that it was not a particularly convincing "solution".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1228197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2020-05-26 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?