> -----Original Message-----
> From: Andrea Faulds [mailto:a...@ajf.me]
> Sent: Thursday, January 15, 2015 12:29 AM
> To: Zeev Suraski
> Cc: rquadl...@gmail.com; Leigh; PHP Internals List
> Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2
>
> Hi Zeev,
>
> > On 14 Jan 2015, at 13:35, Zeev Suraski <z...@zend.com> wrote:
> >
> > I don’t think we’re ever going to get consensus.  But judging by the
> feedback to the v0.1 version, I tend to disagree that the opposers would
> have blocked it.  There were certainly opposers – but not that many of
> them
> as far as I could tell.  I think it stood a good chance to pass at a 2/3.
> Unlike
> strict typing – we didn’t even go to a vote on it, which I think is
> unfortunate
> (and should be changed, before changing course completely as this v0.2
> suggests).
> >
> > We’re definitely not going to have consensus on introducing both options
> as per this RFC.  I for one think it’s the worst possible option.
>
> It’s certainly possible it would’ve succeeded on internals. However, it is
> also
> worth considering the opinions of those who do not frequent internals and
> don’t have the right to vote.
>
> From what I can see, the larger PHP community is generally in favour of
> strict
> typing, and among them, the previous RFC revision was received quite
> poorly.

Andrea,

I'm not sure what you're basing that assumption on.  The incidental
interactions you (or anybody) may have with 'the community', by no way
represent the opinion of the community at large.  The vast majority of the
PHP community never ever interacts with internals@, never attend
conferences, don't write blog posts about PHP and are generally completely
'under the radar'.  I would actually go to argue that the people who do
attend conferences, participate on internals@ or write blog posts - are not
representative of the PHP userbase at large.  The vast majority of
developers I bump into - you will never ever hear from.  They constitute the
vast majority of the ~5M strong PHP developer base.

So even though my belief / educated guess is that the vast majority of the
PHP userbase would prefer to see strict typing kept off this language, I'm
not going to argue that - but we must not argue the opposite either, based
on the non-representative anecdotal data from a few dozen people.

>Myself, I might have been somewhat happy with just weak hints, but
> it would upset an awful lot of developers who would like some measure of
> strict typing. Developers who would most likely not use the new scalar
> type
> hints, because they weren’t strict. And if nobody uses them, why add them?

How do you deduce that 'nobody uses them' from the fact that some group of
people said they won't?  I'm sorry, but it makes no sense, especially given
the positive feedback you saw on internals, making it clear that there would
be in fact people using it.  Note that unlike the opposition to strong
typing - which has always been about the fact that the concept of strict
typing is alien to and inconsistent with rest of PHP - the opposition to
auto-casting typing is "I won't use it because it doesn't do what I'd like
it to do".   People who don't want to use it won't use it, but based on the
feedback v0.1 received, it was clear plenty of people would.

> This revision hopes to possibly placate both weak and strict typing
> advocates. Of course, it also will lose some support in that it allows a
> choice.
> Plus, it gives the user choice, not the API designer, which I expect will
> be
> somewhat controversial. But I am hopeful.

I'm not sure what to say, so I'll repeat what I said before.

If there's one thing that's worse than introducing an alien concept like
strict typing into PHP, it's introducing it as a feature that will include
all the negatives of this alien concept, PLUS have the ability to radically
change how it behaves based on a runtime option.  It's so bad that we
decided more than a decade ago that we want to refrain from ever introducing
such elements to PHP again (e.g. magic_quotes_runtime), and I'm not sure why
we're even discussing it.

To be honest, before you wrote the v0.1 RFC I was talking with Dmitry
regarding the possibility of writing one up myself.  You saved me a lot of
work by working on one.  I hope that based on the feedback from numerous
people here you'll abandon v0.2, but if not, I'd want take over v0.1 of the
RFC and propose it as an alternative.  v0.2 as disastrous for PHP.

Zeev

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

Reply via email to