[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] OOPs not based on Structs.




interesting you should mention it...  there is an interesting article
in this issue of TPJ on multi-level dispatch in perl which points out
specifically why C++/java/et al have a problem that perl solves.  the
article explains it better than i can.

methods described there DO leave room for some interesting expiraments...

> One of those perl vs the rest debates came up on another list when it
> struck me what an interesting twist Perl OOPS has.
> 
> In most languages, Pascal derivatives, C++, smalltalk etc. At the heart of
> an object is the basic non-atomic data type, a struct. In perl an object
> can be a blessed reference to any of its data types. Scalar, Hash, Array
> or code fragment.
> 
> Question. What curious perl Arcana can we dredge up along the line of...
> "You can do ... in Perl because Perl Objects are not structs."
> 
> ie. How bizarre, creative and twisted can you be courtesy of this fact?
> 
> The archetypical example being the perltoot's "Closures as Objects"
> example. Alas, as perltoot is, umm, meant to be instructive I fear his
> creativity was constrained.

-- 
 Steven Lembark                                   2930 W. Palmer St.
                                                 Chicago, IL  60647
 lembark@wrkhors.com                                   800-762-1582

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe