Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^7: A wholly inadequate reply to an Anonymous Monk

by audreyt (Hermit)
on Apr 23, 2010 at 13:36 UTC ( [id://836522]=note: print w/replies, xml ) Need Help??


in reply to Re^6: A wholly inadequate reply to an Anonymous Monk
in thread A wholly inadequate reply to an Anonymous Monk

The dash syntax one was straightforward. This works in Perl 5:

*{"foo-bar"} = sub { "Hello, @_!\n" }; print &{"foo-bar"}('world');

It might work in Perl 4 or even Perl 3, but I had not verified yet... :-)

As for object systems: Well, the very notion of "object systems" means "interfaces as types", and it's precisely across those interfaces we bridge between calling conventions.

Please refer to William Cook's slides and essay for more rigorous explanations of the interface/OO link.

So in that sense, there are really no totally incompatible object systems, since any two such systems can embed one another using cross-system meta-object protocol.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-28 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found