Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2016-10-21 23:20 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (291 votes). Check out past polls.