On Mon, Mar 16, 2015 at 1:04 PM, Dan Ackroyd <dan...@basereality.com> wrote:
> On 16 March 2015 at 11:49, Pavel Kouřil <pajou...@gmail.com> wrote:
>>>>
>>
>> Seriously, think about it for a while - when some setting that changes
>> how code behaves was a good idea?
>
>
> The problem is that there are two irreconcilable camps - some people
> want weak STHs, other people want strict STHs.
>
> This RFC gives both camps what they want, at the cost of having the dual mode.
>
> I personally would prefer a single mode, with strict STHs but I can
> see that would piss off the other camp. And so to me, this RFC even
> with the ickiness of the setting, is an an acceptable cost to giving
> both sides what they want. Oh, and people who don't want to use scalar
> type hints at all, can still continue to not use scalar type hints,
> and their code will continue to keep working.
>
> Anyone who is voting no, isn't doing so because they are missing out
> on a feature, they're doing it to block other people from getting what
> they want in PHP, which is just a terrible way to vote.
>
> And if the strict camp are wrong and strict scalars are just not used
> by a large proportion of the PHP community, it would be trivial to
> remove support for the strict mode in a future version of PHP, as all
> code that runs in strict mode, will automatically work in weak mode.
>
> cheers
> Dan

I can't speak for anyone who voted, but personally, if I could vote, I
would voted "no" - not because "I don't want to block people from
getting what they want", but because I sincerely think that having ANY
setting that changes code's behavior is bad in the long run (and that
removing the feature might not be really easy, once people realize
that the feature is really bad, as people realized with safe_mode and
register_globals after few years).

I work on multiple projects for multiple clients - some have great
code base, some have a bad one. Different typing contexts in different
projects isn't going to help anything at all - it will only bring a
mental overhead.

It's really a shame the other way around wasn't put to vote - to add
weak types, and if there's still enough momentum for "strict"* types,
add them with the Dual Mode (although I would love to see PHP without
Dual Mode completly).

*) I also hate the name "strict" types, because this behavior is
called "strongly typed" in every other language I stumbled upon; why
does PHP have to be a special snowflake? But it's just an aesthetic
thing, so it doesn't matter THAT much.

PS: Also, I personally don't have a preference between strict or weak
typing. I wished from the first moment the Dual Mode was RFC'd that
just ONE ruleset would be chosen, and people would adapt to it. (Given
the weak nature of PHP, the weak types probably fit more, but I
personally could lived with either of those - just not at the same
time.)

Regards
Pavel Kouril

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

Reply via email to