develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [PATCH] Add "safe arrow/safe dereference" operator: &&->

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
November 29, 2010 01:08
Subject:
Re: [PATCH] Add "safe arrow/safe dereference" operator: &&->
Message ID:
AANLkTi=n4m_dFN3hUd1q439cGwmC6X1zFkWf=fn9yZEh@mail.gmail.com
On 29 November 2010 10:05, Abigail <abigail@abigail.be> wrote:
> On Sun, Nov 28, 2010 at 09:48:09PM +0100, Dr.Ruud wrote:
>> On 2010-11-28 20:15, Zefram wrote:
>>> Rafael Garcia-Suarez wrote:
>>
>>>> Yes, I think that&&->  is a very good spelling.
>>>
>>> It seems a poor spelling to me.  It is rather bulky to go between
>>> tokens with typically no whitespace around it (as "->" is usually used).
>>> The "&&" part suggests a pretty low precedence, whereas in fact it'll be
>>> in the highest-precedence group of all.  The "&&" also suggests that the
>>> behaviour will be controlled by truth-value interpretation of the LHS,
>>> which is not the case.  The only thing the "&&" part has going for it
>>> is that it correctly suggests the short-circuiting, but short-circuiting
>>> operators are not exclusively doubled punctuation, so there's not really
>>> a strong call for that kind of spelling for that reason.
>>>
>>> I favour "-&>".  It looks, as it should, like a modified arrow.
>>
>> My truthiness is that the '&' is about bits and the '&&' about trueness.
>
>
> Yes, that's the same feeling I have. I prefer '&&->' over '-&>'.
>
> I've suggested '->>', but I didn't get any support for it (otoh, noone
> said he disliked it either).

I dislike it, because it will be difficult to include in POD in C<< >> quotes :)
(No-one commented on ~> either)

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