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

Re: Twigils

Thread Previous | Thread Next
From:
shmnem
Date:
August 13, 2021 08:21
Subject:
Re: Twigils
Message ID:
alpine.DEB.2.21.2108131017040.4388@mgm-net.de
From the keyboard of Darren Duncan [13.08.21,00:58]:
[..]
> 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.
>
> The blessed hash way:
>
>  $self->{x}
>  $other->{y}
>  (any appropriate value expression)->{z}
>
> The Corinna way:
>
>  $self->!x
>  $other->!y
>  (any appropriate value expression)->!z
>
> Or something like that.

I propose $self~>x
This is close enough, but maybe not visually distinct enough. Or is it?

0--gg-

-- 
_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                               /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
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