# A plea for unity on scalar types

- Thread: https://externals.io/message/84689
- Original archive: https://news-web.php.net/php.internals/84689
- Started by Anthony Ferrara on 2015-03-13T15:45:15+00:00
- Messages: 31
- Page 1 of 2: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/84689.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #84689 — Anthony Ferrara — 2015-03-13T15:45:15+00:00

URL: https://externals.io/message/84689#84689

All,

There's something that I think needs to be said about the now 3 scalar
type proposals. Please bear with me, there's a lot to say here. I'll
try to keep it as brief as I can.

I've been working off-and-on on scalar types for over 3 years. I've
officially proposed 3 proposals and have discussed and played with
many more versions. After I left, Andrea mentioned to me that she
wanted to pick one up. So I helped her. I worked with her for months
on what was ultimately withdrawn
(https://wiki.php.net/rfc/scalar_type_hinting_with_cast). At that
point I resigned to the fact that it wasn't possible to do scalar
types in PHP.

Andrea proved me wrong. When she came up with the dual-mode RFC in
0.3, it was the first proposal that either of us worked on that even
had a shot of passing. She put it up to vote slightly prematurely, but
the votes were pretty clear that it was basically what people wanted,
but with a few minor "issues". When she abandoned it, I picked it up.
Partly because I wanted to see it pass (I think it's the right
proposal), but partly because I didn't want to see her efforts go in
vain by people who didn't even understand the why.

So let me explain what I learned through that experience. Why I chose
to pick the dual mode RFC back up. Why I predicted the coercive mode
RFC would do so badly. And why I currently predict the basic scalar
type RFC, if voted on, would fail as well.

It comes down to what people want. It became quite clear early on,
that no matter what rule set you choose, there is a non-trivial amount
of people who want something else. This is life.

However, in this case, there are basically 3 camps:

1) Those that want purely weak types (what we have with ZPP now).
2) Those that want stronger weak types (similar to what the coercive
mode proposal does, but slightly stricter)
3) Those that want strict types.

Each of these three camps has a non-trivial amount of members (at
least 20-30%). Personal interactions that I've had suggest to me that
the largest camp is for strong types, but even if it wasn't, it's
still not trivial.

So what does that mean? Well, it means that no single mode proposal
can pass. Because any single mode proposal is 100% guaranteed to
alienate the needs/wants of at least 1, but more likely 2 of those
groups.

The current dual mode proposal is the only one that I've seen that
doesn't alienate groups. It gives the purely weak camp what they want
(and by default too). It gives the strict type camp what they want.
And it lets the stronger-weak-types group choose between the two as
they want/need. Is it a perfect proposal? No. But it works for
everyone, rather than against them.

Zeev mentioned on twitter yesterday that he wants to "at least try and
understand why people are voting no for it and turn it around" with
respect to his coercive proposal. Despite the fact that many people
have said in threads why they voted against it, let me say it again
here, really simply. There are two fundamental reasons people are
voting against it: 1) Backwards Compatibility and 2) It alienates the
needs of a portion of voters. And there's a deeper problem. In trying
to "clean up" the conversions, it partially makes it stricter than
some want (the purely weak group) and doesn't go far enough for those
that want stronger weak types. So it sits as a worst-of-all-worlds.

Bob's pure-weak proposal (which is basically 1/2 of the dual mode RFC)
seems like a great compromise. It's simple, easy to use, easy to
understand, and can be part of a stepping stone to future modes (a
strict mode can always be added later).

But that ignores that it doesn't give 2/3 of the people what they
want/need. It ignores that it actually makes it *less* likely for
those 2/3 to get what they want/need. Without the support of 2 of the
groups, it's unlikely that anything will ever pass. And a future RFC
to introduce a strict mode (after we have a weak mode) would be
unlikely to pass since it serves no benefit to the weak group.

So what effectively would happen is you'd get at least 1 of the groups
(the strict group) to vote against it. And you'd get at least a few
from the stronger-weak types group to vote against it. Meaning that it
would be hard to get it passed.

Scalar types are a **hard** problem. Not technically, but politically,
because so many people use PHP in different ways. And everyone thinks
their way is "the one true way". The dual-mode proposal is the only
one on the table that currently addresses the different needs of
different people.

Does that mean that a single-mode compromise is impossible? I wouldn't
use the word impossible, but I certainly would use improbable. We've
been talking about this for **years**. The chances are quite high that
if a good compromise existed, it would have been found. Instead, every
"compromise" that we've seen simply throws away the needs of an entire
group.

Should we clean up ZPP's parsing rules? Absolutely. "100 apples"
should definitely become an error. But the way to do that is not as a
last-minute change to the language rules. The way we should do that is
with MASSIVE testing to ensure that the breaks are well controlled and
warranted. This is not something that should be done in the 2 days
prior to freeze, but should be planned an executed in a really clear
timeline. Perhaps that's a good goal for 7.1 or 8.0.

But for today, I firmly believe that the Dual-Mode proposal is the
only one that stands a chance of passing. I think it's the best chance
for the language, and it's the only one that tries to unite the
different usages of PHP into a single group, rather than alienating
users.

I respectfully ask Zeev to retract his current proposal as it's
currently failing with 68% of voters voting against it (currently
16:34). Without extending the timeline for 7, there's very little
chance of it passing. So rather than dragging out the entire process
needlessly for 2 more weeks, can we just finally be done with it?

Thanks,

Anthony

---

## #84690 — Johannes Ott — 2015-03-13T16:10:45+00:00

URL: https://externals.io/message/84689#84690 · In reply to: #84689

Thanks for the clear statement, which lights up the fog a little bit for.

Watching out for a scalar typehints feature for round about 10 years
without knowing about this internal list, I always was wondering what
can be so complicated to implement it, because I already evaluated some
different ways how to do this for my thesis.

I already thought about a political reason for that. I'm with you that
your Dual RFC is the right solution to satisfy the needs of all of the
three mentioned groups in my opinion as well.

I would give a clear +1 to it, but I don't have any voting karma yet!

Regards
-- 
DerOetzi

---

## #84692 — Stelian Mocanita — 2015-03-13T16:51:14+00:00

URL: https://externals.io/message/84689#84692 · In reply to: #84690

Thanks Anthony for the thorough explanation and your view on the matter,
highly appreciated. I am sure that long-term developers have gone through
both ends of the strong types, either loving their lack while picking up
php for
the first time, either cursing it's lack later on along the way.

As you mentioned you can pretty much do anything in PHP in both small setups
or even "enterprise" - god I hate that word - so it would make sense to
have
something that gives both parties what they want.

Having said this, I am truly hoping we can put an end to all this and have
your
current RFC in and move along.

Regards
Stelian



> Thanks for the clear statement, which lights up the fog a little bit for.
>
> Watching out for a scalar typehints feature for round about 10 years
> without knowing about this internal list, I always was wondering what
> can be so complicated to implement it, because I already evaluated some
> different ways how to do this for my thesis.
>
> I already thought about a political reason for that. I'm with you that
> your Dual RFC is the right solution to satisfy the needs of all of the
> three mentioned groups in my opinion as well.
>
> I would give a clear +1 to it, but I don't have any voting karma yet!
>
> Regards
> --
> DerOetzi

---

## #84696 — Marcio Almada — 2015-03-13T17:24:41+00:00

URL: https://externals.io/message/84689#84696 · In reply to: #84689

Hi,

2015-03-13 12:45 GMT-03:00 Anthony Ferrara <ircmaxell@gmail.com>:

> All,
> [...]
> I respectfully ask Zeev to retract his current proposal as it's
> currently failing with 68% of voters voting against it (currently
> 16:34). Without extending the timeline for 7, there's very little
> chance of it passing. So rather than dragging out the entire process
> needlessly for 2 more weeks, can we just finally be done with it?
>
> Thanks,
>
> Anthony
>
> --
> 
> 
>
>
At the time I'm witting this, the "Coercive Scalar Types" RFC needs 52
"yes" votes to reach minimum ratio. This RFC was well discussed and people
justified their "no" votes quite verbosely on the respective thread. Being
practical, we all know it has no chances to pass.

By keeping this vote running we put in risk all the advancements that are
already so close to be consolidated. Loosing this opportunity would be
damaging for both the major part of the community and the RFC process
itself, IMMO, specially because the dual mode RFC already reached super
majority and the voting would be closed today.

The concurrent RFC, that is now clearly rejected, had its chance and
failed. I agree that dropping the vote for "Coercive Scalar Typehints" is
the logical (even noble) attitude in such context. Please let's not drag
this situation for more two weeks for nothing.

Regards,
Márcio

---

## #84701 — Maciej Sobaczewski — 2015-03-13T18:04:30+00:00

URL: https://externals.io/message/84689#84701 · In reply to: #84689

Currently Scalar Type Declarations are going to fall. We have 33 No 
votes and I really wonder why there is almost no justification for them. 
I know that it's not required, but it is a matter of good taste in whole 
voting proces.

I think (and I do really hope) that some of those 33 votes came from 
misunderstanding of the proposal. Why don't we try to minify the number 
of doubts.

Also, I'd like to ask about the way these accounts are allowed to vote, 
according to our rules:

https://people.php.net/user.php?username=olemarkus
https://people.php.net/user.php?username=brianlmoon
https://people.php.net/user.php?username=dom

No Karma makes me feel it's right thing to raise this question. Are they 
" Representatives from the PHP community, that will be chosen by those 
with php.net SVN accounts"?

Best regards,
Maciej.

W dniu 2015-03-13 o 16:45, Anthony Ferrara pisze:
> All,
>
> There's something that I think needs to be said about the now 3 scalar
> type proposals. Please bear with me, there's a lot to say here. I'll
> try to keep it as brief as I can.
>
> I've been working off-and-on on scalar types for over 3 years. I've
> officially proposed 3 proposals and have discussed and played with
> many more versions. After I left, Andrea mentioned to me that she
> wanted to pick one up. So I helped her. I worked with her for months
> on what was ultimately withdrawn
> (https://wiki.php.net/rfc/scalar_type_hinting_with_cast). At that
> point I resigned to the fact that it wasn't possible to do scalar
> types in PHP.
>
> Andrea proved me wrong. When she came up with the dual-mode RFC in
> 0.3, it was the first proposal that either of us worked on that even
> had a shot of passing. She put it up to vote slightly prematurely, but
> the votes were pretty clear that it was basically what people wanted,
> but with a few minor "issues". When she abandoned it, I picked it up.
> Partly because I wanted to see it pass (I think it's the right
> proposal), but partly because I didn't want to see her efforts go in
> vain by people who didn't even understand the why.
>
> So let me explain what I learned through that experience. Why I chose
> to pick the dual mode RFC back up. Why I predicted the coercive mode
> RFC would do so badly. And why I currently predict the basic scalar
> type RFC, if voted on, would fail as well.
>
> It comes down to what people want. It became quite clear early on,
> that no matter what rule set you choose, there is a non-trivial amount
> of people who want something else. This is life.
>
> However, in this case, there are basically 3 camps:
>
> 1) Those that want purely weak types (what we have with ZPP now).
> 2) Those that want stronger weak types (similar to what the coercive
> mode proposal does, but slightly stricter)
> 3) Those that want strict types.
>
> Each of these three camps has a non-trivial amount of members (at
> least 20-30%). Personal interactions that I've had suggest to me that
> the largest camp is for strong types, but even if it wasn't, it's
> still not trivial.
>
> So what does that mean? Well, it means that no single mode proposal
> can pass. Because any single mode proposal is 100% guaranteed to
> alienate the needs/wants of at least 1, but more likely 2 of those
> groups.
>
> The current dual mode proposal is the only one that I've seen that
> doesn't alienate groups. It gives the purely weak camp what they want
> (and by default too). It gives the strict type camp what they want.
> And it lets the stronger-weak-types group choose between the two as
> they want/need. Is it a perfect proposal? No. But it works for
> everyone, rather than against them.
>
> Zeev mentioned on twitter yesterday that he wants to "at least try and
> understand why people are voting no for it and turn it around" with
> respect to his coercive proposal. Despite the fact that many people
> have said in threads why they voted against it, let me say it again
> here, really simply. There are two fundamental reasons people are
> voting against it: 1) Backwards Compatibility and 2) It alienates the
> needs of a portion of voters. And there's a deeper problem. In trying
> to "clean up" the conversions, it partially makes it stricter than
> some want (the purely weak group) and doesn't go far enough for those
> that want stronger weak types. So it sits as a worst-of-all-worlds.
>
> Bob's pure-weak proposal (which is basically 1/2 of the dual mode RFC)
> seems like a great compromise. It's simple, easy to use, easy to
> understand, and can be part of a stepping stone to future modes (a
> strict mode can always be added later).
>
> But that ignores that it doesn't give 2/3 of the people what they
> want/need. It ignores that it actually makes it *less* likely for
> those 2/3 to get what they want/need. Without the support of 2 of the
> groups, it's unlikely that anything will ever pass. And a future RFC
> to introduce a strict mode (after we have a weak mode) would be
> unlikely to pass since it serves no benefit to the weak group.
>
> So what effectively would happen is you'd get at least 1 of the groups
> (the strict group) to vote against it. And you'd get at least a few
> from the stronger-weak types group to vote against it. Meaning that it
> would be hard to get it passed.
>
> Scalar types are a **hard** problem. Not technically, but politically,
> because so many people use PHP in different ways. And everyone thinks
> their way is "the one true way". The dual-mode proposal is the only
> one on the table that currently addresses the different needs of
> different people.
>
> Does that mean that a single-mode compromise is impossible? I wouldn't
> use the word impossible, but I certainly would use improbable. We've
> been talking about this for **years**. The chances are quite high that
> if a good compromise existed, it would have been found. Instead, every
> "compromise" that we've seen simply throws away the needs of an entire
> group.
>
> Should we clean up ZPP's parsing rules? Absolutely. "100 apples"
> should definitely become an error. But the way to do that is not as a
> last-minute change to the language rules. The way we should do that is
> with MASSIVE testing to ensure that the breaks are well controlled and
> warranted. This is not something that should be done in the 2 days
> prior to freeze, but should be planned an executed in a really clear
> timeline. Perhaps that's a good goal for 7.1 or 8.0.
>
> But for today, I firmly believe that the Dual-Mode proposal is the
> only one that stands a chance of passing. I think it's the best chance
> for the language, and it's the only one that tries to unite the
> different usages of PHP into a single group, rather than alienating
> users.
>
> I respectfully ask Zeev to retract his current proposal as it's
> currently failing with 68% of voters voting against it (currently
> 16:34). Without extending the timeline for 7, there's very little
> chance of it passing. So rather than dragging out the entire process
> needlessly for 2 more weeks, can we just finally be done with it?
>
> Thanks,
>
> Anthony

---

## #84702 — Benjamin Eberlei — 2015-03-13T18:10:42+00:00

URL: https://externals.io/message/84689#84702 · In reply to: #84701

> Currently Scalar Type Declarations are going to fall. We have 33 No votes
> and I really wonder why there is almost no justification for them. I know
> that it's not required, but it is a matter of good taste in whole voting
> proces.
>
> I think (and I do really hope) that some of those 33 votes came from
> misunderstanding of the proposal. Why don't we try to minify the number of
> doubts.
>
> Also, I'd like to ask about the way these accounts are allowed to vote,
> according to our rules:
>
> https://people.php.net/user.php?username=olemarkus
> https://people.php.net/user.php?username=brianlmoon
> https://people.php.net/user.php?username=dom
>
> No Karma makes me feel it's right thing to raise this question. Are they "
> Representatives from the PHP community, that will be chosen by those with
> php.net SVN accounts"?
>

Not sure how bringing this up helps anybody, questing wheater any arbitrary
amount of accoutns should actually vote or not.

The voting rights are just how they are bound to participating in any way
to the PHP project.

>
> Best regards,
> Maciej.
>
> W dniu 2015-03-13 o 16:45, Anthony Ferrara pisze:
>
>  All,
> > […]

---

## #84703 — eli@eliw.com — 2015-03-13T18:12:35+00:00

URL: https://externals.io/message/84689#84703 · In reply to: #84701

I really don't think that you want us to be going down the
"Republican/Democrat Redistricting" game Maciej, not during an active
vote at least.   Attempting to 'help one side win' by deciding that some
people's votes on the side that you are not for ... should just be
discounted.

Is not the way to attempt to 'win' a vote.

Eli



> Currently Scalar Type Declarations are going to fall. We have 33 No
> votes and I really wonder why there is almost no justification for
> them. I know that it's not required, but it is a matter of good taste
> in whole voting proces.
>
> I think (and I do really hope) that some of those 33 votes came from
> misunderstanding of the proposal. Why don't we try to minify the
> number of doubts.
>
> Also, I'd like to ask about the way these accounts are allowed to
> vote, according to our rules:
>
> https://people.php.net/user.php?username=olemarkus
> https://people.php.net/user.php?username=brianlmoon
> https://people.php.net/user.php?username=dom
>
> No Karma makes me feel it's right thing to raise this question. Are
> they " Representatives from the PHP community, that will be chosen by
> those with php.net SVN accounts"?
>
> Best regards,
> Maciej.
>

-- 
|   Eli White   |   http://eliw.com/   |   Twitter: EliW   |

---

## #84704 — Leigh — 2015-03-13T18:21:31+00:00

URL: https://externals.io/message/84689#84704 · In reply to: #84696

> At the time I'm witting this, the "Coercive Scalar Types" RFC needs 52
> "yes" votes to reach minimum ratio. This RFC was well discussed and people
> justified their "no" votes quite verbosely on the respective thread. Being
> practical, we all know it has no chances to pass.
>
> By keeping this vote running we put in risk all the advancements that are
> already so close to be consolidated. Loosing this opportunity would be
> damaging for both the major part of the community and the RFC process
> itself, IMMO, specially because the dual mode RFC already reached super
> majority and the voting would be closed today.
>
> The concurrent RFC, that is now clearly rejected, had its chance and
> failed. I agree that dropping the vote for "Coercive Scalar Typehints" is
> the logical (even noble) attitude in such context. Please let's not drag
> this situation for more two weeks for nothing.

Indeed, at this point in time the Coercive RFC is considered harmful,
a lot of damage has already been done, but we can at least try and
mitigate further damage.

Many people who have been coerced (see what I did there?) into voting
for the coercive RFC have voted against the dual-mode RFC out of
principal. Yes for one is No for another, makes sense. How many do you
think will revisit their vote if one RFC is retracted?

So I also urge people to consider this. Do you want scalar type hints
in the language? If there was only the dual-mode RFC, would you vote
for it? If the answer to both of those is Yes, then you should
consider supporting the option that actually stands a chance of
passing.

If you're in the strict camp, and you're voting against because you
don't want to declare strict in every file, there are ways around
this. Don't oppose the RFC simply on this issue alone.

Cheers,

Leigh.



> Hi,
>
> 2015-03-13 12:45 GMT-03:00 Anthony Ferrara <ircmaxell@gmail.com>:
>
> > […]
> At the time I'm witting this, the "Coercive Scalar Types" RFC needs 52
> "yes" votes to reach minimum ratio. This RFC was well discussed and people
> justified their "no" votes quite verbosely on the respective thread. Being
> practical, we all know it has no chances to pass.
>
> By keeping this vote running we put in risk all the advancements that are
> already so close to be consolidated. Loosing this opportunity would be
> damaging for both the major part of the community and the RFC process
> itself, IMMO, specially because the dual mode RFC already reached super
> majority and the voting would be closed today.
>
> The concurrent RFC, that is now clearly rejected, had its chance and
> failed. I agree that dropping the vote for "Coercive Scalar Typehints" is
> the logical (even noble) attitude in such context. Please let's not drag
> this situation for more two weeks for nothing.
>
> Regards,
> Márcio

---

## #84707 — Jan Ehrhardt — 2015-03-13T18:39:22+00:00

URL: https://externals.io/message/84689#84707 · In reply to: #84701

Maciej Sobaczewski in php.internals (Fri, 13 Mar 2015 19:04:30 +0100):
>I think (and I do really hope) that some of those 33 votes came from 
>misunderstanding of the proposal.

Maybe. But on the other hand there are some names in the v0.5 no-camp,
that you would want to be on the yes side in such a controversial issue:
dmitry, xinchen, mike, rasmus, stas and zeev, to name some. There seems
to be a big divide between those and the 65-67% in the yes-camp at the
moment. If Zeev retracts the Coercive RFC at the moment both proposals
may fail.

Anthony's plea for unity is right on target. No one would benefit from a
divided community.

Jan

BTW: ajf's vote is still missing in the v0.5 RFC !?

---

## #84710 — Maciej Sobaczewski — 2015-03-13T19:21:29+00:00

URL: https://externals.io/message/84689#84710 · In reply to: #84703

Eli, I don't even try to. However, when the result is tentative, it's 
good to be sure that we don't have any incorrect votes.

Yes, I'm in favor of this RFC and I never concealed it, *but* I'm not 
going to discredit any of the voting members. If the final decision will 
be negative I'll just get over it and go on. On the other hand, I'm 
going to and I will raise my concerns until we have time for that.

W dniu 2015-03-13 o 19:12, Eli pisze:
> I really don't think that you want us to be going down the
> "Republican/Democrat Redistricting" game Maciej, not during an active
> vote at least.   Attempting to 'help one side win' by deciding that some
> people's votes on the side that you are not for ... should just be
> discounted.
>
> Is not the way to attempt to 'win' a vote.
>
> Eli

---

## #84712 — pajousek@gmail.com — 2015-03-13T19:38:32+00:00

URL: https://externals.io/message/84689#84712 · In reply to: #84689

>
> But for today, I firmly believe that the Dual-Mode proposal is the
> only one that stands a chance of passing. I think it's the best chance
> for the language, and it's the only one that tries to unite the
> different usages of PHP into a single group, rather than alienating
> users.
>

Hello,

I see (as a userland developer) these problems with dual mode:
- It is a "setting" that changes the language's behavior; I don't
think that it matters whether or not it would be an INI setting or the
declare() one, because both of them are bad.
- It does not "unite different usages of PHP into a single group"; it
does exactly the opposite, splitting PHP usage into TWO groups.
- Once this dual mode would be introduced to PHP, there would probably
be no way of removing it later without massive BC break, once most
people would realize that it is really awful to have it in the
language.

(There's probably more of them, but these are the biggest issues I
currently have.)

Regards
Pavel Kouril

---

## #84718 — Philip Sturgeon — 2015-03-13T21:01:31+00:00

URL: https://externals.io/message/84689#84718 · In reply to: #84712

Pavel,


> 
> > […]
>
> Hello,
>
> I see (as a userland developer) these problems with dual mode:
> - It is a "setting" that changes the language's behavior; I don't
> think that it matters whether or not it would be an INI setting or the
> declare() one, because both of them are bad.
> - It does not "unite different usages of PHP into a single group"; it
> does exactly the opposite, splitting PHP usage into TWO groups.
> - Once this dual mode would be introduced to PHP, there would probably
> be no way of removing it later without massive BC break, once most
> people would realize that it is really awful to have it in the
> language.
>
> (There's probably more of them, but these are the biggest issues I
> currently have.)
>
> Regards
> Pavel Kouril
>
> --
> 
> 
>

Hang on. This is not the time to nitpick things in various RFCs that
have already been answered time and time again.

An ini setting would be insane because taking an app that works on one
machine and putting it on another would completely break the app.
Hello anything using Composer, hello any CMS, hello any system moving
to a new host that doesn't let you change ini settings, or you dont
know how.

A declare statement in the top of the file changing how that file
handles things is hardly a problem, and is exactly how a lot of other
languages do things. Hello JavaScript.

It seems like you didn't read anything now you're just saying "it's
bad" a lot. Please don't do that.

---

## #84719 — pajousek@gmail.com — 2015-03-13T21:06:26+00:00

URL: https://externals.io/message/84689#84719 · In reply to: #84718

> Pavel,
>
> 
> > […]
>
> Hang on. This is not the time to nitpick things in various RFCs that
> have already been answered time and time again.
>
> An ini setting would be insane because taking an app that works on one
> machine and putting it on another would completely break the app.
> Hello anything using Composer, hello any CMS, hello any system moving
> to a new host that doesn't let you change ini settings, or you dont
> know how.
>
> A declare statement in the top of the file changing how that file
> handles things is hardly a problem, and is exactly how a lot of other
> languages do things. Hello JavaScript.
>
> It seems like you didn't read anything now you're just saying "it's
> bad" a lot. Please don't do that.


Hello,

there may maybe be some misinterpretation of what I'm saying, but I
read everything from the scalar types discussions in the past 2 or 3
months, actually.

I know ini setting is much much worse than this, but this is imho
still bad - the "intent" is pretty much similiar (aka some directive
that changes how code behaves); I've been saying that I disagree with
this approach ever since the Andrea's first Dual Mode was published as
a RFC and I feel I need to bring it up again.

Regards
Pavel Kouril

---

## #84737 — Arvids Godjuks — 2015-03-13T23:02:58+00:00

URL: https://externals.io/message/84689#84737 · In reply to: #84718

пт, 13 Мар 2015, 23:01, Philip Sturgeon <pjsturgeon@gmail.com>:

> Pavel,
>
> 
> > […]
> wrote:
> > […]
>
> Hang on. This is not the time to nitpick things in various RFCs that
> have already been answered time and time again.
>
> An ini setting would be insane because taking an app that works on one
> machine and putting it on another would completely break the app.
> Hello anything using Composer, hello any CMS, hello any system moving
> to a new host that doesn't let you change ini settings, or you dont
> know how.
>
> A declare statement in the top of the file changing how that file
> handles things is hardly a problem, and is exactly how a lot of other
> languages do things. Hello JavaScript.
>
> It seems like you didn't read anything now you're just saying "it's
> bad" a lot. Please don't do that.
>
> --
> 
> 
>
> That declare thing with the removal of block-aware declare(){} kills one
of the fundamental optimizations you can do for large PHP projects -
compacting most used files into one single big file and caching it. And you
never had to  care what the files are - just splice it all together and let
autoload handle the rare cases. With single declare statement I effectivly
have to scan all the code, remove declare statements and choose a mode
globally. Well, it might work for a small project, but in a big project
with multiple teams or even multiple vendors doing different parts....

At this point I have only swearing words for the proposing persons and
supporters.
It's magic_quotes and register_globals all over again, but this time you
can't fix it with some PHP code.

You really had to fuck it all up for us, the userland developers, didn't
you?

Sorry, but I now question the wisdom and sanity of most new PHP folks.
Because the old once see the danger and vote "no". And everyone just thinks
they act up. Well, you wrong. I will nit be surprised if they just leave
the project for good after this.

---

## #84739 — Anthony Ferrara — 2015-03-13T23:11:35+00:00

URL: https://externals.io/message/84689#84739 · In reply to: #84737

Arvids,

> That declare thing with the removal of block-aware declare(){} kills one of
> the fundamental optimizations you can do for large PHP projects - compacting
> most used files into one single big file and caching it. And you never had
> to  care what the files are - just splice it all together and let autoload
> handle the rare cases. With single declare statement I effectivly have to
> scan all the code, remove declare statements and choose a mode globally.
> Well, it might work for a small project, but in a big project with multiple
> teams or even multiple vendors doing different parts....

http://news.php.net/php.internals/83356 <-- That's why it isn't
supported. I tried. I wanted to. It's just not feasible. If you want
to find a way, go for it. We can then add that mode later. Awesome!

However, if you really want to merge files together, great. Strip out
the strict mode and change everything to weak. It will all still work
100% **unless** you relied on the exception (which you shouldn't be
doing anyway).

And that's not even mentioning that with opcache the benefits of
merging files together is diminished significantly. But if you want
to, there's still a way.

> At this point I have only swearing words for the proposing persons and
> supporters.
> It's magic_quotes and register_globals all over again, but this time you
> can't fix it with some PHP code.
>
> You really had to fuck it all up for us, the userland developers, didn't
> you?
>
> Sorry, but I now question the wisdom and sanity of most new PHP folks.
> Because the old once see the danger and vote "no". And everyone just thinks
> they act up. Well, you wrong. I will nit be surprised if they just leave the
> project for good after this.

Please remain respectful. That section was *way* out of line, and you
really must know that.

Anthony

---

## #84740 — Benjamin Eberlei — 2015-03-13T23:11:48+00:00

URL: https://externals.io/message/84689#84740 · In reply to: #84737

On Sat, Mar 14, 2015 at 12:02 AM, Arvids Godjuks <arvids.godjuks@gmail.com>
wrote:

> пт, 13 Мар 2015, 23:01, Philip Sturgeon <pjsturgeon@gmail.com>:
>
> > […]
> wrote:
> > […]
> of the fundamental optimizations you can do for large PHP projects -
> compacting most used files into one single big file and caching it. And you
> never had to  care what the files are - just splice it all together and let
> autoload handle the rare cases. With single declare statement I effectivly
> have to scan all the code, remove declare statements and choose a mode
> globally. Well, it might work for a small project, but in a big project
> with multiple teams or even multiple vendors doing different parts....
>

The same is true for namespaces, but Symfony for example works around it by
introducing block syntax.
You can just remove the declares, during concatenation, or move a single
strict to the top.

Also this is not a fundamental optimization (I'd argue never has been)
anymore since opcache is in core of PHP since 5.5

>
> At this point I have only swearing words for the proposing persons and
> supporters.
> It's magic_quotes and register_globals all over again, but this time you
> can't fix it with some PHP code.
>
> You really had to fuck it all up for us, the userland developers, didn't
> you?
>
> Sorry, but I now question the wisdom and sanity of most new PHP folks.
> Because the old once see the danger and vote "no". And everyone just thinks
> they act up. Well, you wrong. I will nit be surprised if they just leave
> the project for good after this.


This list gets pretty intense, but this kind of swearing and attack on
persons is certainly not acceptable in my book.

Like every feature, this is optional.

---

## #84745 — Arvids Godjuks — 2015-03-13T23:29:42+00:00

URL: https://externals.io/message/84689#84745 · In reply to: #84740

Opcode caches just cache the compiled code - you still need to load the
code into the engine, do checks for file modifications and other stuff.

Yes, if you are a badass and have full controll, all that can be solved.
Reality, however, is one big f***up. I had to fix a lot of weird stuff,
including the cases where there was some kind of opcode cache and it still
was horrible. Or shared enviroment. Or just bad code. You havent seen
FTP/SFTP project deployment in last few years? I envy you. You work for
godly clients. Or it's just that you are a rockstar in a rockstar friendly
company with resources and will to do things right. But most of us a far
lower in the food chain. We have to deal with things that would give you
nightmares.

Or take most of Open Source PHP code - besides a few high quality projects
like Symfony and the bunch, it's bad. And I know one instanse of an Open
Source project with PHP part that will go full retard mode with strict
typehints no matter the cost or consiquences. Probably will end up killing
the company behind it in the long run.

There is one thing that you learn when you actually go beyound the coding:
never ever give user a choise - he doesn't know what he wants anyway. He
thinks he needs one thing, in reality tests show absolutelly different
stuff. You need to make a decision select a way you wana do it. It newer
works out with choises - people always make a mess.

сб, 14 Мар 2015, 1:11, Benjamin Eberlei <kontakt@beberlei.de>:

> On Sat, Mar 14, 2015 at 12:02 AM, Arvids Godjuks <arvids.godjuks@gmail.com
> > […]
>
> > […]
>
> The same is true for namespaces, but Symfony for example works around it
> by introducing block syntax.
> You can just remove the declares, during concatenation, or move a single
> strict to the top.
>
> Also this is not a fundamental optimization (I'd argue never has been)
> anymore since opcache is in core of PHP since 5.5
>
> > […]
>
>
> This list gets pretty intense, but this kind of swearing and attack on
> persons is certainly not acceptable in my book.
>
> Like every feature, this is optional.

---

## #84748 — Arvids Godjuks — 2015-03-13T23:48:02+00:00

URL: https://externals.io/message/84689#84748 · In reply to: #84745

And actually, I would plea for a moment of sanity right now.

As far as i'm concerned - the RM for the 7.0 had to step in a long time ago
and said "guys, I do not accept any typehint proposals into the 7.0
release, work it out and come back for 7.1".
Because if this would be a commercial development before a release -
feature would be scrapped and re-sheduled for later release.
Why? Because the clusterf**k happened at RFC level already, the development
itself is going to be haisty considering the timeline and definetly being
bombarded by the protesters, countless critisism and so on. It is going to
affect the projects. And that is a bad thing. Look past the damn typehint
RFC's and just try to asses the big picture. Right now it's a tunnel vision
for many on the list.

сб, 14 Мар 2015, 1:29, Arvids Godjuks <arvids.godjuks@gmail.com>:

> Opcode caches just cache the compiled code - you still need to load the
> code into the engine, do checks for file modifications and other stuff.
>
> Yes, if you are a badass and have full controll, all that can be solved.
> Reality, however, is one big f***up. I had to fix a lot of weird stuff,
> including the cases where there was some kind of opcode cache and it still
> was horrible. Or shared enviroment. Or just bad code. You havent seen
> FTP/SFTP project deployment in last few years? I envy you. You work for
> godly clients. Or it's just that you are a rockstar in a rockstar friendly
> company with resources and will to do things right. But most of us a far
> lower in the food chain. We have to deal with things that would give you
> nightmares.
>
> Or take most of Open Source PHP code - besides a few high quality projects
> like Symfony and the bunch, it's bad. And I know one instanse of an Open
> Source project with PHP part that will go full retard mode with strict
> typehints no matter the cost or consiquences. Probably will end up killing
> the company behind it in the long run.
>
> There is one thing that you learn when you actually go beyound the coding:
> never ever give user a choise - he doesn't know what he wants anyway. He
> thinks he needs one thing, in reality tests show absolutelly different
> stuff. You need to make a decision select a way you wana do it. It newer
> works out with choises - people always make a mess.
>
> сб, 14 Мар 2015, 1:11, Benjamin Eberlei <kontakt@beberlei.de>:
>
> On Sat, Mar 14, 2015 at 12:02 AM, Arvids Godjuks <arvids.godjuks@gmail.com
> > […]

---

## #84769 — Lester Caine — 2015-03-14T11:08:42+00:00

URL: https://externals.io/message/84689#84769 · In reply to: #84748

> And actually, I would plea for a moment of sanity right now.
> 
> As far as i'm concerned - the RM for the 7.0 had to step in a long time ago
> and said "guys, I do not accept any typehint proposals into the 7.0
> release, work it out and come back for 7.1".
> Because if this would be a commercial development before a release -
> feature would be scrapped and re-sheduled for later release.
> Why? Because the clusterf**k happened at RFC level already, the development
> itself is going to be haisty considering the timeline and definetly being
> bombarded by the protesters, countless critisism and so on. It is going to
> affect the projects. And that is a bad thing. Look past the damn typehint
> RFC's and just try to asses the big picture. Right now it's a tunnel vision
> for many on the list.

Seconded ...
There are more important things to get right, so perhaps just protecting
the hooks for type hints is the best that can be fully supported in PHP7 ?
Lets simply get the ground rules on naming conventions and what is
reserved and the like to start the path to bigger things later?

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---

## #84771 — padraic.brady@gmail.com — 2015-03-14T11:44:40+00:00

URL: https://externals.io/message/84689#84771 · In reply to: #84748

Hi,


> And actually, I would plea for a moment of sanity right now.
>
> As far as i'm concerned - the RM for the 7.0 had to step in a long time ago
> and said "guys, I do not accept any typehint proposals into the 7.0
> release, work it out and come back for 7.1".
> Because if this would be a commercial development before a release -
> feature would be scrapped and re-sheduled for later release.
> Why? Because the clusterf**k happened at RFC level already, the development
> itself is going to be haisty considering the timeline and definetly being
> bombarded by the protesters, countless critisism and so on. It is going to
> affect the projects. And that is a bad thing. Look past the damn typehint
> RFC's and just try to asses the big picture. Right now it's a tunnel vision
> for many on the list.

This has been under discussion for a really long time and putting it
off is unlikely to substantially change the outcome. The current RFCs
went to vote within the allowed timeline for PHP7. What you are
basically saying is that the entire PHP 7 timeline is flawed. If
that's the case then you should be arguing for the PHP7 timing to be
changed, if you feel that any RFC will need additional development
time, not for the typehinting RFCs to all be withdrawn.

Paddy

--
Pádraic Brady

http://blog.astrumfutura.com
http://www.survivethedeepend.com

---

## #84774 — Derick Rethans — 2015-03-14T12:10:14+00:00

URL: https://externals.io/message/84689#84774 · In reply to: #84737

> At this point I have only swearing words for the proposing persons and 
> supporters.

Certainly *that* is going to help?

> It's magic_quotes and register_globals all over again, but this time 
> you can't fix it with some PHP code.

It is not even close to equivalent. As those options are php.ini 
settings. There is nothing, absolutely *nothing*, that will change if 
you, as an author of a PHP file, does not use typehints in that file.

If a dev turns a file that he or she wrote into strict mode, then that 
only counts for that specific file. If you take over some code, then you 
can remove the declare line. *none* of those things you'd be able to do 
with ini settings. So don't shout out that nonsense FUD.

> You really had to fuck it all up for us, the userland developers, 
> didn't you?
> 
> Sorry, but I now question the wisdom and sanity of most new PHP folks.
> Because the old once see the danger and vote "no". And everyone just thinks
> they act up. Well, you wrong. I will nit be surprised if they just leave
> the project for good after this.

Yes, because of people like you swearing at them.

cheers,
Derick

---

## #84776 — Peter van Fessem — 2015-03-14T13:37:08+00:00

URL: https://externals.io/message/84689#84776 · In reply to: #84774

> 
>
> > […]
>
> It is not even close to equivalent. As those options are php.ini
> settings. There is nothing, absolutely *nothing*, that will change if
> you, as an author of a PHP file, does not use typehints in that file.
>
> If a dev turns a file that he or she wrote into strict mode, then that
> only counts for that specific file. If you take over some code, then you
> can remove the declare line. *none* of those things you'd be able to do
> with ini settings. So don't shout out that nonsense FUD.
>

It's equivalent to an ini setting in that it changes the behavior of the 
code based on something that is declared elsewhere. Obviously a declare 
statement in the top of the file is a lot better than an ini setting, 
but I think the principle is the same.

I prefer consistency over choice. I don't think it's that important that 
it matches my wishes/requirements exactly, because it's never going to; 
but if a switch is going to be implemented, I'm going to have to use 
both depending on who I work with/for, and that seems a lot more 
annoying than whatever the type system ends up being.

I would strongly prefer a type system that matches the current type 
conversion rules, and slowly 'strengthen' these *together*, over the 
next few major releases to something that matches the weak type system 
proposals.

Somewhat unrelated: I don't really buy the javascript strict mode 
comparison. Strict mode was added to differentiate between an 'old' and 
a 'new' system, but here two new modes are added in one go.

Just my 2 cents.

Regards,
Peter

---

## #84777 — Lester Caine — 2015-03-14T15:05:34+00:00

URL: https://externals.io/message/84689#84777 · In reply to: #84769

> Lets simply get the ground rules on naming conventions and what is
> reserved and the like to start the path to bigger things later?

I'll ask yet again a question that I keep asking but not seeing anybody
explaining. Just what is being added which PHP5 will actually baulk at?
I've been assuming 'the type hints' and that it is adding these which
will make a current library unusable with PHP5 systems? All of the
discussion on just HOW the type hints are handled is secondary to the
basic breaking of the code base? Once a third party has added type hints
we have to handle the results, which may be different depending on how
the 'user' of type hint expects it to be interpreted? Weak or Strict
will fail in different ways? But of more interest, just what happens if
I pick up a library that has been 'improved' by the inclusion of strict
types but I'm still working with no typing at all? Or rather legacy type
checking as part of the code base.

The code base I will be running myself with PHP7 is PHP5.4 with `E_STRICT` 
etc. clean code. That is what the test bed is comparing and with what
has been added so far the code simply works, and I expect THAT to be the
case but I keep seeing things which suggest I will HAVE to make changes
to the PHP5.4 code for it to run clean on PHP7 by the time we get to RC
stage?

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---

## #84779 — Dan Ackroyd — 2015-03-14T16:03:31+00:00

URL: https://externals.io/message/84689#84779 · In reply to: #84777

> Just what is being added which PHP5 will actually baulk at?
> The code base I will be running myself with PHP7 is PHP5.4 with `E_STRICT` 
> etc. clean code.

For the RFC https://wiki.php.net/rfc/scalar_type_hints_v5 that is on
the edge of passing there will be no effects on BC for code, except
for the fact that int/string etc are now reserved words.

There may be other issues upgrading to 7 caused by other RFCs - but
that scalar type hints proposal does not cause any issues.

> I'll ask yet again a question that I keep asking but not seeing anybody
> explaining.

Perhaps if you sent fewer emails to the internals list, people would
be more likely to read and respond to the emails you do send?

cheers
Dan

---

## #84785 — Larry Garfield — 2015-03-14T20:41:15+00:00

URL: https://externals.io/message/84689#84785 · In reply to: #84737

> At this point I have only swearing words for the proposing persons and
> supporters.
> It's magic_quotes and register_globals all over again, but this time you
> can't fix it with some PHP code.
>
> You really had to fuck it all up for us, the userland developers, didn't
> you?
>
> Sorry, but I now question the wisdom and sanity of most new PHP folks.
> Because the old once see the danger and vote "no". And everyone just thinks
> they act up. Well, you wrong. I will nit be surprised if they just leave
> the project for good after this.

If you're going to behave this way in public, please just leave the 
project for good. It will be good for the project.

--Larry Garfield

---

Next page: https://externals.io/message/84689.md?page=2
