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?? |
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:
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".
In Section
Seekers of Perl Wisdom
|
|