Groups | Search | Server Info | Login | Register


Groups > comp.lang.perl.misc > #24895

Re: on Perl

Path csiph.com!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> (permalink)
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)
Xref csiph.com comp.unix.shell:25146 comp.unix.programmer:15877 comp.lang.misc:10533 comp.lang.perl.misc:24895

Cross-posted to 4 groups.

Show key headers only | View raw


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. 

Back to comp.lang.perl.misc | Previous | NextPrevious in thread | Find similar


Thread

Re: on Perl Javier <invalid@invalid.invalid> - 2024-04-16 20:47 +0000
  Re: on Perl Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-17 03:14 +0000
    Re: on Perl Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-17 18:04 +0100
      Re: on Perl Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-17 23:23 +0000
        Re: on Perl Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-17 16:59 -0700
          Re: on Perl Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-18 01:33 +0000
            Re: on Perl Rainer Weikusat <rweikusat@talktalk.net> - 2024-04-18 18:09 +0100

csiph-web