Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: When should a wheel be reinvented

by exussum0 (Vicar)
on Jun 30, 2004 at 16:56 UTC ( #370805=note: print w/replies, xml ) Need Help??


in reply to When should a wheel be reinvented

In general...

If it does what you want but can't modify it, you wrap it.
If it's a blackbox, you rewrite it if you have the resources. Blackboxes are dangerous.
If you have the source, you fix it unless it takes too long.

-s

Bart: God, Schmod. I want my monkey-man.

Replies are listed 'Best First'.
Re^2: When should a wheel be reinvented
by tilly (Archbishop) on Jul 01, 2004 at 02:16 UTC
    You cannot generally wrap a callback interface with a looping interface unless you have continuations, co-routines, or some other similar construct. Perl does not. (Well, there is a module that adds it, but I'm not sure what issues it has. Certainly it isn't a built-in feature.)

    Whether it is good for a language to have continuations is another debate, and there are top-notch people who'll argue both sides of that choice.

    Regardless, Perl 6 will have continuations.

      Here, here. See this node for some further discussion (which, in fact, also happens to mention File::Find and it's callback-based interface).
      ------------ :Wq Not an editor command: Wq
        If you're motivated, I'd suggest trying to find some of Dominus' comments on File::Find. His opinion seems to resemble yours - File::Find works well except that the API can be very inconvenient. IIRC his book (which should be coming out really soon...) on higher-order Perl implements an iterator-based equivalent to File::Find.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2019-10-15 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?