Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Re^5: Moose role with requirement consuming another role

by Anonymous Monk
on Jul 21, 2011 at 11:08 UTC ( #915834=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Moose role with requirement consuming another role
in thread Moose role with requirement consuming another role

I think you'll like these
http://en.wikipedia.org/wiki/Abstract_type
http://c2.com/cgi/wiki?AbstractBaseClass
http://c2.com/cgi/wiki?AbstractClass
My understanding matches Arunbears, abstract classes aren't concrete, they can be a contract (virtual/interface), or actually do stuff (traits/roles), but you can't make an instance.


Comment on Re^5: Moose role with requirement consuming another role
Re^6: Moose role with requirement consuming another role
by Boldra (Deacon) on Jul 21, 2011 at 11:20 UTC
    Thanks for those definitions.

    This statement:

    In CeePlusPlus, a class that has any PureVirtual member functions is an abstract base class.
    seems to suggest that, at least for C++, an abstract base class is the same as an abstract class.

    However, I still think it's clear that while all Moose roles are abstract classes (they cannot be instantiated), only those Moose roles which do nothing more than list 'requires' are abstract base classes. None of the Moose roles I am using are abstract base classes.

    Update: Having read more about the "interface role", I've changed my mind. What I called an abstract base class above is really an interface-only role. Arunbear recognized this in the beginning. I don't have any of these in my real code.



    - Boldra

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-04-21 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls