in reply to Re^3: Something to meditate on -- the need for a trendy perl?
in thread Something to meditate on -- the need for a trendy perl?
Perl's object system was 'borrowed' from Python, so e.g. in both languages instance methods are just functions that take 'self' as the first parameter to access the object's state:
# Perl sub get_name { my ($self) = @_; return $self->{name}; } # Python def get_name(self): return self.name
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Something to meditate on -- the need for a trendy perl?
by perl-diddler (Chaplain) on Mar 12, 2014 at 19:03 UTC | |
by tobyink (Canon) on Mar 13, 2014 at 23:42 UTC |