Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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

by chromatic (Archbishop)
on Jun 03, 2004 at 18:34 UTC ( #360352=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?

Barring my opinion that Java interfaces are so far broken they're almost worse than not even attempting to solve the problem, no.

Type systems aren't only for statically typed languages. They're useful in dynamic systems as well as systems which can't do every type check at compile time. (These two categories overlap a bit.)

The nice thing about having language support for interfaces in your type system is being able to check that an object you've received somehow conforms to the interface you expect to use with it. It's a little nicer if the language can check that for you (whether statically, at compile time, dynamically, or at runtime), but at worse, you can also check it yourself.

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://360352]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-11-26 19:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (706 votes), past polls