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?? |
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")
In Section
Meditations
|
|