> -----Original Message-----
> From: Anthony Ferrara [mailto:ircmax...@gmail.com]
> Sent: Sunday, February 22, 2015 12:25 AM
> To: Zeev Suraski
> Cc: PHP internals
> Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC
>
> Zeev,
>
>
> "with two potential 'camps' of developers forming up"
>
> Have you looked at the community lately? That's been happening for a
> decade. One camp likes to engineering everything out using classes and
> libraries. The other keeps using PHP procedurally and ignoring changing
> "best
> practices" (and I do mean the quotes). Does that make one better than the
> other? NO.

I don't think these two camps map to the strict and dynamic camps,
definitely not for the userbase at large.
Which means that whatever camps we have today, we'd have more - one extra
point of division.

> And that's PHP's strength. It gives both sides the power to keep doing
> what
> they want to be doing without having to give up or be burdened by the
> other
> side.

I explained both in the RFC and here why I don't think providing two modes
for doing something quite similar are good.  We can agree to disagree :)

> Sure, some people will do that. Just like people still use single quotes
> because
> they are faster.

Not quite IMHO - that example actually requires some relatively advanced
knowledge.  Strict, with the amount of noise that Scalar Type Hints are
bound to get (and are already getting) - is bound to have a lot more
exposure than single quotes being faster ever had.  And it's therefore very
likely it'll be used by people who shouldn't really be using it.

Let's leave the Static Analysis part aside, and agree to disagree as we
already did numerous times but failed to implement.

> > Two more things regarding the competing RFC – it’s still alive, and
> > being promoted for PHP 7.0;  And while it doesn’t create a huge BC
> > break, it allows developers to selectively create localized BC breaks,
> > on a per file basis.
>
> No, it does not. A BC break is something where existing code works, and
> you
> do nothing more than upgrade and have the new code not work anymore.
>
> With the other dual-mode RFC, if a user opts-in (enables strict mode), if
> code
> doesn't work that's not a BC break. That's a case of "you told us explicit
> you
> don't want this code to work if it's invalid, and guess what, it's
> invalid".

That's splitting hairs IMHO.  The bottom line is that many people will
undergo the same process Rasmus did as he experimented, flipping the switch
on because it's a best practice, and start having to fix their code to work.
But we can also agree on what we always agree here too :)

Thanks,

Zeev

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to