develooper Front page | perl.perl5.porters | Postings from August 2021

Re: Twigils

Thread Previous | Thread Next
From:
Veesh Goldman
Date:
August 13, 2021 09:19
Subject:
Re: Twigils
Message ID:
CAO-W_8AN+8MmYyHXLKo=6P9wKvGH-wkWi2x47iWVCp7QXtrzFg@mail.gmail.com
I think the idea of accessing $other's slots is debatable, and shouldn't be
used as a driving factor in this syntax discussion.
In my opinion, anyway, we shouldn't have a default way to access members of
other objects. If that sort of sharing is needed, it should be explicit
with its own interface.

On Fri, Aug 13, 2021, 12:13 Darren Duncan <darren@darrenduncan.net> wrote:

> On 2021-08-13 1:02 a.m., Tom Molesworth via perl5-porters wrote:
> > On Fri, 13 Aug 2021 at 15:59, Darren Duncan wrote:
> >     I believe the best way to design this is to do something that
> directly mirrors
> >     the current blessed hashref approach, which is that you ALWAYS
> reference a slot
> >     in terms of a subscript of an object of the type.
> >
> > Strong disagreement from me on this - after using Object::Pad for a
> while, it's
> > painful to go back to the old approaches.
> >
> > Slot access is a common operation, so I find the single-character
> Huffman
> > encoding we have now to be an excellent fit.
>
> I don't have a problem with the single character Huffman coding as an
> ADDITIONAL
> option.  But it needs to be in ADDITION to something like what I proposed,
> because that Huffman option itself only gives access to slots for a single
> object of the current class while mine works for all objects of the
> current
> class. -- Darren Duncan
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About