Keep It Simple, Stupid | |
PerlMonks |
Re^2: Procedural vs OOP modules (mixing interfaces)by LanX (Saint) |
on Oct 29, 2021 at 10:10 UTC ( [id://11138195]=note: print w/replies, xml ) | Need Help?? |
There are "class methods" like Class->new() which expect $class as first arg, but you propagate Class::func() which doesn't. I'm not thrilled about mixing $obj->methods() which expect $self and such pure functions Class::funcs() ... This has some code smell for me and should be well thought of. I think this might sabotage many patterns like sub-classing... Can you give an example where this makes sense?
updateI took a quick glimpse into static functions for C++ and Java and they look very much like class methods to me.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|