Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

(tye)Re3: Why do you need abstract classes in Perl?

by tye (Sage)
on Mar 06, 2001 at 11:04 UTC ( [id://62455]=note: print w/replies, xml ) Need Help??


in reply to (dws)Re: (tye)Re2: Why do you need abstract classes in Perl?
in thread Why do you need abstract classes in Perl?

Thank you for the clarification.

Sorry for my mistake. When talking about abstract classes in Perl, I don't pay too much attention to detail as the whole concept seems a bit silly to me (defining a simple list of method names as "an interface definition" -- I'm smirking just typing that -- but I'm also repeating myself).

Of course, UNIVERSAL isn't a very good concrete class because you can't properly create objects of type UNIVERSAL.

But I wouldn't call it an abstract class as it doesn't really define a common interface (it implements a couple of helper functions that are never meant to be overridden). You could stretch and call it an abstract class because it doesn't implement new(), but it doesn't define an interface for new() either, so I do consider that a stretch. So it would be an abstract class that has no abstract operations?

Perhaps someone with a big list of fancy OO terms can come up with a term that is a better fit. ("helper", "degenerate", and "catch-all" come to my mind)

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-19 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found