Deutsch English Français Italiano |
<87o7a6zjg3.fsf@doppelsaurus.mobileactivedefense.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat <rweikusat@talktalk.net> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc,comp.lang.perl.misc Subject: Re: on Perl Date: Thu, 18 Apr 2024 18:09:32 +0100 Lines: 33 Message-ID: <87o7a6zjg3.fsf@doppelsaurus.mobileactivedefense.com> References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <0d2cnVzOmbD6f4z7nZ2dnZfqnPudnZ2d@brightview.co.uk> <20240408075547.000061e8@gmail.com> <g52cnWOOwoz_son7nZ2dnZfqnPWdnZ2d@brightview.co.uk> <uvbe3m$2cun7$1@dont-email.me> <Mkidnafag8vlooH7nZ2dnZfqn_idnZ2d@brightview.co.uk> <pan$c8c3e$b0e492b3$c544c27e$d72bff90@invalid.invalid> <uvk8o6$h2pg$3@dont-email.me> <dRicnfsW0phufoP7nZ2dnZfqnPednZ2d@brightview.co.uk> <uvnerd$1ct1p$1@dont-email.me> <87jzkvor7q.fsf@bsb.me.uk> <uvplme$1rupi$2@dont-email.me> <87le5br16d.fsf@nosuchdomain.example.com> <uvpt9m$2126r$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net eq/zrm3nOnwiyAtsZE6SeA7CA3RMk4+0Gv9uVmgONHm/5z6XA= Cancel-Lock: sha1:CPMJdsWV8YO1sbgxHcfiXd3hqyQ= sha1:2NNEVY8vTj4Sk0cwotAttr82BJY= sha256:EGzZ6gqSkBrBXsdaVrpcLLL4xoy6M5UsTPP4tGUYPYk= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Bytes: 2946 Lawrence D'Oliveiro <ldo@nz.invalid> writes: > On Wed, 17 Apr 2024 16:59:06 -0700, Keith Thompson wrote: > >> Lawrence D'Oliveiro <ldo@nz.invalid> 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: > > It says there is already supposed to be a mechanism for this, it doesn’t > explain why that isn’t good enough. There's a mechanism for method dispatch in class hierarcies. There's no builtin support whatsoever for handling class instance data (or class data, for that matter). This has certain advantages (everything a reference refers to can be used as object, eg, file handles) and is reasonably easy to provide for cases without multiple inheritance and doable otherwise. OTOH, that absolutely not what people familiar with other programming languages expect and also beyond what many of them can wisely handle. Hence, a more dictatorial approach is probably expected to improve things¹. ¹ Somewhat questionable when looking at another newer feature, namely, subroutine signatures. It would be absolutely great if perl support real function prototypes including checking function invocations for correctness at compile time *and* *not* at runtime everytime a function is called.