3 ms·
Perl OO = library. Scheme OO = library. Library != language. The last time I tried to use Perl OO, CPAN had to download a bunch of stuff for Moose. That doesn't
by omouse 18y ago
Perl OO = library. Scheme OO = library. Library != language. The last time I tried to use Perl OO, CPAN had to download a bunch of stuff for Moose. That doesn't sound like it's part of the core language to me.
Has the situation changed? Are there OO things included with the default dist of Perl?
- newt0311 18y agoActually in lisp (and scheme as scheme is a dialect of lisp), the line between library and language is so fuzzy that its practically invisible.
- jrockway 18y agoPerl 5 has had OO forever. Here's how it works: package Class; sub new { my $class = shift; bless {} => $class } sub method { my $self = shift; $self->{attribute} = 'value' }; package Subclass; our @ISA = qw(Class); sub method { my $self = shift; $self->SUPER::method(...); ... } package main; my $class = Subclass->new; $class->method; This is built into the core.