Path: csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc,comp.lang.perl.misc Subject: Re: on Perl Date: Wed, 17 Apr 2024 16:59:06 -0700 Organization: None to speak of Lines: 27 Message-ID: <87le5br16d.fsf@nosuchdomain.example.com> References: <87edbtz43p.fsf@tudado.org> <0d2cnVzOmbD6f4z7nZ2dnZfqnPudnZ2d@brightview.co.uk> <20240408075547.000061e8@gmail.com> <87jzkvor7q.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 18 Apr 2024 01:59:08 +0200 (CEST) Injection-Info: dont-email.me; posting-host="79ba507064daf9a3a41c021f3f9a882b"; logging-data="1974567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xx3/3r+kBHlWec57yFlV5" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:qA28PsXkIXxs5u1j0LOIwhM3ODY= sha1:jJ1PDBsVgD8tLBTVSo8nYoVP6GQ= Xref: csiph.com comp.unix.shell:25135 comp.unix.programmer:15862 comp.lang.misc:10517 comp.lang.perl.misc:24893 Lawrence D'Oliveiro 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) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Medtronic void Void(void) { Void(); } /* The recursive call of the void */