Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Interfaces for the masses!

by rvosa (Curate)
on Mar 24, 2006 at 01:15 UTC ( [id://538917]=note: print w/replies, xml ) Need Help??


in reply to Re: Interfaces for the masses!
in thread Interfaces for the masses!

traits/roles are going to be a boon. In a way, though, by saying that some class does some role you are entering into a contract not completely dissimilar to interfaces, right? (That is, if I understand what I've read of the Apocalypses and Synopses correctly.)

Replies are listed 'Best First'.
Re^3: Interfaces for the masses!
by chromatic (Archbishop) on Mar 24, 2006 at 07:37 UTC

    An interface (as you describe it, similar to the Java concept) is a degenerate case of a role. A role can provide default (and even parametrized) implementations of the appropriate methods and can disambiguate dispatch at compile time.

    Hopefully, Perl 6 will even also be able to dispatch multimethods based on roles.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found