On 29 November 2010 21:27, Zefram <zefram@fysh.org> wrote:
> Jesse Vincent wrote:
>>Why _shouldn't_ we bless ->? as the correct syntax for "defined/safe
>>dereference"?
>
> Because it doesn't at all match Perl 6's ".?". Our operator
> is conditional on defined($lhs), but Perl 6's is conditional on
> $lhs->can("rhs"). These are very different semantics.
>
> Apart from wanting to match Perl 6, having the "?" come at the end of
> the arrow suggests that the conditionality is focussed on the RHS (which
> it is with Perl 6's operator). The condition we're actually concerned
> with is purely about the LHS, so if the extra character to signal it is
> not going to be in the middle of the arrow then it should come first.
> I'd be mostly OK with "?->", I just find it visually breaks up awkwardly.
I really hope that -?> is chosen instead of ?->, which I already
*hate* typing. (chord-key-chord is no fun unless you are a pianist -
which I am not).
cheers,
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
Thread Previous
|
Thread Next