in reply to Perl OOP
1. No, because that's a terrible idea. If I've created a class, why shouldn't you be able to inherit from it?
2. Perl objects are (by default) equal when they refer to the same memory address. It makes sense to override this if you have a more useful definition of equality.
3. No, Perl is weakly typed so has no need for anything equivalent to generics. There's little point in creating a List<T> template if lists accept all data types by default.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl OOP
by Arunbear (Prior) on Jul 05, 2017 at 12:40 UTC | |
by tobyink (Canon) on Jul 05, 2017 at 17:07 UTC | |
by Arunbear (Prior) on Jul 06, 2017 at 16:56 UTC | |
by pryrt (Abbot) on Jul 06, 2017 at 18:04 UTC | |
|
Re^2: Perl OOP
by QueenSvetlana (Novice) on Jul 05, 2017 at 00:45 UTC | |
by Marshall (Canon) on Jul 05, 2017 at 03:43 UTC | |
by tobyink (Canon) on Jul 05, 2017 at 09:24 UTC | |
by tobyink (Canon) on Jul 05, 2017 at 10:27 UTC | |
by tobyink (Canon) on Jul 05, 2017 at 09:16 UTC |