Re: on Perl
Keith Thompson <[email protected]> Wed, 17 Apr 2024 16:59:06 -0700
| Newsgroups | comp.unix.shell,comp.unix.programmer,comp.lang.misc,comp.lang.perl.misc |
|---|---|
| Organization | None to speak of |
| Message-ID | <[email protected]> |
Lawrence D'Oliveiro <[email protected]> writes: > On Wed, 17 Apr 2024 18:04:57 +0100, Ben Bacarisse wrote: >> Perl has had support for object-oriented programming (with multiple >> inheritance) for many years -- too many for me to remember. > > Then why this new “class” thing in 5.38? It's explained reasonably well at the top of the "perldoc perlclass" documentation in Perl 5.38: History Since Perl 5, support for objects revolved around the concept of *blessing* references with a package name. Such reference could then be used to call subroutines from the package it was blessed with (or any of its parents). This system, while bare-bones, was flexible enough to allow creation of multiple more advanced, community-driven systems for object orientation. Class feature is a core implementation of class syntax which is familiar to what one would find in other programming languages. It isn't a "bless" wrapper, but a completely new system built right into the perl interpreter. -- Keith Thompson (The_Other_Keith) [email protected] Working, but not speaking, for Medtronic void Void(void) { Void(); } /* The recursive call of the void */