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

Re: Twigils

Thread Previous | Thread Next
August 13, 2021 08:21
Re: Twigils
Message ID:
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?


_($_=" "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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About