Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by eyepopslikeamosquito (Archbishop)
on Jan 08, 2019 at 10:51 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1228197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-23 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found