Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Open to debate on mixins and traits.

by adrianh (Chancellor)
on Jun 03, 2004 at 14:37 UTC ( #360175=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Open to debate on mixins and traits.
in thread Open to debate on mixins and traits.

I don't see why Perl needs interfaces in any form, they're just there to satisfy the compiler in statically typed languages, aren't they?

No they're not ;-) Not if we're using the term as used in Java land anyway. They're a way of talking about common behaviour that cuts across class hierarchy boundaries.

In Perl 6 they're subsumed by roles (a Java interface would the equivalent to a role without any implementation code.)

(Note: Apply my standard "I've not read A12 properly yet" disclaimer to the previous sentence, but I'm sure chromatic will correct me if I'm wrong :-)


Comment on Re^4: Open to debate on mixins and traits.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-09-16 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (158 votes), past polls