Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Tracing zombie variables.

by ash (Monk)
on Aug 29, 2002 at 12:59 UTC ( #193749=note: print w/replies, xml ) Need Help??


in reply to Re: Tracing zombie variables.
in thread Tracing zombie variables.

  > In the case I proposed this is not really a factor as the
  > only method calls that I suggest you support is new() and
  > DESTROY() and they only get called once per object and
  > thus the overhead is negligable.

You're indeed right demerphq.
I was blinded by the method explained in Mastering Algorithms with Perl
which has methods for next() and prev().

Thank you for enlightenment.

-- 
Ash/asksh <ask@unixmonks.net>

Replies are listed 'Best First'.
Re: Re: Re: Tracing zombie variables.
by demerphq (Chancellor) on Aug 29, 2002 at 13:23 UTC
    s blinded by the method explained in Mastering Algorithms with Perl which has methods for next() and prev().

    And rightly so. You _should_ supply such methods. If there is any chance that someone outside of your module will need to access these methods/attributes then you should provide a method interface for them to do so.

    However inside of your module, the one that manipulates the actual data structure, you can certainly make the design decision to use the underlying object implementation. After all it is your code and your implementation so the only one that you can burn is yourself.

    For instance I completely bypass the method interface for my node objects in my Treap implementation. However my node is a subclass of a Class::Struct so that anything outside can have something more stable to utilize. (ie no nasty suprises for users that use the method interface).

    Yves / DeMerphq
    ---
    Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2023-12-03 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (20 votes). Check out past polls.

    Notices?