On Wed, Dec 18, 2013 at 10:17 PM, Tjerk Meesters
<[email protected]>wrote:
> Hi Hannes,
>
>
> On Thu, Dec 19, 2013 at 10:08 AM, Hannes Magnusson <
> [email protected]> wrote:
>
> > On Wed, Dec 18, 2013 at 6:04 PM, Tjerk Meesters
> > <[email protected]> wrote:
> > > Hi Kris,
> > >
> > >
> > > On Thu, Dec 19, 2013 at 8:35 AM, Kris Craig <[email protected]>
> > wrote:
> > >
> > >>
> > >>> That said, if there are other reasons for voting 'no' besides
> > >>> associativity, feel free to shoot me an email or discuss it on the
> > list.
> > >>>
> > >>
> > >> What did it for me was the lower precedence for the unary minus. I
> > don't
> > >> want to have another language that thinks a negative number squared
> is a
> > >> negative number. I understand and respect your reasoning as outlined
> in
> > >> the RFC, but this is a deal-breaker for me.
> > >>
> > >
> > > I've had a short discussion with Anthony about this and he convinced me
> > > that I was indeed wrong about my "unary minus" reasoning; therefore I
> > have
> > > updated the RFC to reflect that. So:
> > >
> >
> >
> > I'm a little bit confused.
> >
> > Are you modifying the poll, and the rfc itself, in the middle of a vote?
> >
>
> You're right. I've made a faux pas, I shouldn't have done that.
>
> Sorry Kris, the change is reverted; in fact, the following documents back
> up my original implementation choice:
> - http://mathforum.org/library/drmath/view/53194.html
> -
>
> http://math.stackexchange.com/questions/491933/exponent-rules-with-negative-numbers
> -
>
> http://math.stackexchange.com/questions/68833/what-does-22-evaluate-to/68834#68834
>
> If the conceptual design of php is that unary operators must bind stronger
> than any binary operator, we would have to restart the vote but I'm hoping
> that won't be necessary.
>
> I shouldn't make decisions before coffee. Apologies for the confusion!
>
>
> >
> > -Hannes
> >
>
>
>
> --
> --
> Tjerk
>
I honestly do not think that the preference of associativity should
out-weigh the benefits of this RFC (having an exponentiation operator).
As covered in the discussion portion and the RFC, the matter of
associativity is clearly preferential and varies form one language to
another, with the majority of languages (reviewed) leaning towards
right-associative exponentiation operators due to the usefulness of
power-tower. Now, with all this said, that doesn't change the fact that
forcing operator precedence is always possible in every language and no
good developer would rather be sorry than safe. So why associativity should
be a strong basis for accepting or rejecting this RFC is beyond me.
Personally, I would rather have the operator in the language, regardless of
the associativity, than not have it at all.