|Perl Monk, Perl Meditation|
How to make Win32::API easy to useby tye (Cardinal)
|on Jun 02, 2004 at 18:41 UTC||Need Help??|
Here is an outline of how to make Win32::API much easier to use. It results in code like:
which is much nicer than how I've used Win32::API. Of course, support for more DWIM argument types is also in order, but I think I've seen such work underway elsewhere. (In fact, I'd probably allow for a code ref as an argument specification...)
Here is how simple this improvement is to implement:
Does this type of simplification come from thinking like "the users", or am I just strange? Does this seem like a huge improvement to others? Anyone else felt "from the beginning" that Win32::API should be creating code refs, like that was the "natural" interface to provide?
I often suspect that many code authors don't put much stress on the point of view of the users of their code. But I find that my view of the world (in so many respects) looks quite skewed to most people...
I'm sorry that this is such a skimpy node. I'm tied up with my day job but wanted to throw this idea out anyway...