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

[FWP] OOPs not based on Structs.



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.

John Carter

Work Email : john@netsys.co.za Private email : cyent@mweb.co.za 
Yell Phone : 083-543-6915      Phone         : 27-12-348-4246

"The code figure 05 shall be used when the obscuration to vision
consists predominantly of lithometeors." - 
World Meteorological Organization Manual on Codes



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