# [RFC] Basic Scalar Types

- Thread: https://externals.io/message/84580
- Original archive: https://news-web.php.net/php.internals/84580
- Started by Bob Weinand on 2015-03-11T21:28:57+00:00
- Messages: 63
- RFC: Basic Scalar Types (Obsolete) — https://externals.io/rfc/basic_scalar_types.md
- Page 1 of 3: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/84580.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #84580 — Bob Weinand — 2015-03-11T21:28:57+00:00

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

Hi all,

after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail.

Thus, I'd like to come up with a fallback proposal in case both proposals fail:

https://wiki.php.net/rfc/basic_scalar_types

It shouldn't prevent any future improvements and still give use all the advantages of scalar types.

Thanks,
Bob

---

## #84585 — Dmitry Stogov — 2015-03-11T21:56:32+00:00

URL: https://externals.io/message/84580#84585 · In reply to: #84580

> Hi all,
>
> after all, some people are not happy with the current proposals about
> scalar types. So, they both still possibly may fail.
>
> Thus, I'd like to come up with a fallback proposal in case both proposals
> fail:
>
> https://wiki.php.net/rfc/basic_scalar_types
>
> It shouldn't prevent any future improvements and still give use all the
> advantages of scalar types.
>

I would definitely vote +1.

I think this would be the best decision for now.

Thanks. Dmitry.



>
> Thanks,
> Bob

---

## #84586 — Johannes Ott — 2015-03-11T22:02:29+00:00

URL: https://externals.io/message/84580#84586 · In reply to: #84580

Am 11.03.2015 um 22:28 schrieb Bob Weinand:
> Hi all,
> 
> after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail.
> 
> Thus, I'd like to come up with a fallback proposal in case both proposals fail:
> 
> https://wiki.php.net/rfc/basic_scalar_types
> 
> It shouldn't prevent any future improvements and still give use all the advantages of scalar types.
> 
> Thanks,
> Bob
> 

From me although a +1 vote.

-- 
DerOetzi

---

## #84587 — Adam Harvey — 2015-03-11T22:04:38+00:00

URL: https://externals.io/message/84580#84587 · In reply to: #84580

> after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail.
>
> Thus, I'd like to come up with a fallback proposal in case both proposals fail:
>
> https://wiki.php.net/rfc/basic_scalar_types
>
> It shouldn't prevent any future improvements and still give use all the advantages of scalar types.

You have my axe, by which I mean +1.

Adam

---

## #84589 — Pierre Joye — 2015-03-11T22:23:15+00:00

URL: https://externals.io/message/84580#84589 · In reply to: #84580

>
> Hi all,
>
> after all, some people are not happy with the current proposals about
scalar types. So, they both still possibly may fail.
>
> Thus, I'd like to come up with a fallback proposal in case both proposals
fail:
>
> https://wiki.php.net/rfc/basic_scalar_types
>
> It shouldn't prevent any future improvements and still give use all the
advantages of scalar types.

Besides what I think of proposing yet another RFC, -1 because it is
basically what the initial idea from the opponents of optional strict mode
wanted before they go with the latest one. It also totally ignore what the
Anthony's proposes.

> Thanks,
> Bob

---

## #84590 — pajousek@gmail.com — 2015-03-11T22:29:35+00:00

URL: https://externals.io/message/84580#84590 · In reply to: #84589

> > […]
> advantages of scalar types.
>
> Besides what I think of proposing yet another RFC, -1 because it is
> basically what the initial idea from the opponents of optional strict mode
> wanted before they go with the latest one. It also totally ignore what the
> Anthony's proposes.
>

Hello,

I'd say that this is definitely better than the dual mode RFC, but
worse than the coercive one - I can't find a single reason why some
modes switch should be good. I can only see negative outcomes from
this, and a painful experience when developing with PHP in the long
run as a userland developer.

Basically goes with what I've been saying from the beggining of the
introduction of the "dual mode" - I don't care if strong or weak
typing wins, but I want only on in the language. PHP is inconsistent,
there's no need to make even more inconsistencies and stuff.

Regards
Pavel Kouril

---

## #84593 — Bob Weinand — 2015-03-11T22:42:31+00:00

URL: https://externals.io/message/84580#84593 · In reply to: #84590

> Am 11.03.2015 um 23:29 schrieb Pavel Kouřil <pajousek@gmail.com>:
> 
> > […]
> 
> Hello,
> 
> I'd say that this is definitely better than the dual mode RFC, but
> worse than the coercive one - I can't find a single reason why some
> modes switch should be good. I can only see negative outcomes from
> this, and a painful experience when developing with PHP in the long
> run as a userland developer.
> 
> Basically goes with what I've been saying from the beggining of the
> introduction of the "dual mode" - I don't care if strong or weak
> typing wins, but I want only on in the language. PHP is inconsistent,
> there's no need to make even more inconsistencies and stuff.
> 
> Regards
> Pavel Kouril

It's not worse than the coercive one. It's just doing less. It doesn't change ZPP.
We always still can change ZPP later in future.

If you like the coercive one, you also should like this one.

Bob

---

## #84595 — Bob Weinand — 2015-03-11T22:46:19+00:00

URL: https://externals.io/message/84580#84595 · In reply to: #84589

> Am 11.03.2015 um 23:23 schrieb Pierre Joye <pierre.php@gmail.com>:
> 
> > […]
> 
> Besides what I think of proposing yet another RFC, -1 because it is basically what the initial idea from the opponents of optional strict mode wanted before they go with the latest one. It also totally ignore what the Anthony's proposes.
> 
Correct. It's just for the case where the other two fail.
We still can add strict mode in a later version if people need it.
All the RFC does is the most basic scalar type hinting you can build everything on. (for example adding the declare(strict_types=1); would work without any BC break on top of it)

I see that it doesn't fit all the users, but there's still room for improvement in later versions.

Bob

---

## #84597 — Nikita Popov — 2015-03-11T22:53:59+00:00

URL: https://externals.io/message/84580#84597 · In reply to: #84580

> Hi all,
>
> after all, some people are not happy with the current proposals about
> scalar types. So, they both still possibly may fail.
>
> Thus, I'd like to come up with a fallback proposal in case both proposals
> fail:
>
> https://wiki.php.net/rfc/basic_scalar_types
>
> It shouldn't prevent any future improvements and still give use all the
> advantages of scalar types.
>

Before I even start thinking about this, I'd like to have clarification as
to whether this RFC is still eligible for targeting the PHP 7.0 release.
The currently accepted interpretation is that all RFC votes must have
started by March 15th, which is irreconcilable with an RFC that was only
submitted today.

Does this mean that we're delaying the PHP 7 schedule by two weeks?

I feel like this topic is getting out of control. It's been discussed for
months, now we had one vote on Andrea's withdrawn proposal, then another
vote on Anthony's proposal, then another vote on the Zeev et al proposal -
and then we're going to have another one on Bob's proposal? With every vote
taking another couple of weeks. Hey, maybe I should also submit a STH
proposal that we can vote on after that?

If both Anthony's and Zeev's proposal fail, I would recommend to just drop
this topic for 7.0 and discuss it again for PHP 7.1. The necessary
forward-compatibility changes to allow that are already proposed in another
RFC.

Nikita

---

## #84598 — pajousek@gmail.com — 2015-03-11T22:56:20+00:00

URL: https://externals.io/message/84580#84598 · In reply to: #84593

> > […]
mode
> > […]
the
> > […]
>
> It's not worse than the coercive one. It's just doing less. It doesn't
change ZPP.
> We always still can change ZPP later in future.
>
> If you like the coercive one, you also should like this one.
>
> Bob

Yeah, I like this one - but I slightly prefer the coercive one. I feel like
this one is just too weak (yes, because it doesn't change the ZPP), but it
is still better than no hints at all - and infinitely better than
introducing two modes.

Hopefully you understand my POV now. :)

Regards
Pavel Kouřil

---

## #84600 — Dmitry Stogov — 2015-03-11T23:06:53+00:00

URL: https://externals.io/message/84580#84600 · In reply to: #84597

> 
>
> > […]
>
> Before I even start thinking about this, I'd like to have clarification as
> to whether this RFC is still eligible for targeting the PHP 7.0 release.
> The currently accepted interpretation is that all RFC votes must have
> started by March 15th, which is irreconcilable with an RFC that was only
> submitted today.
>
> Does this mean that we're delaying the PHP 7 schedule by two weeks?
>
> I feel like this topic is getting out of control. It's been discussed for
> months, now we had one vote on Andrea's withdrawn proposal, then another
> vote on Anthony's proposal, then another vote on the Zeev et al proposal -
> and then we're going to have another one on Bob's proposal? With every vote
> taking another couple of weeks. Hey, maybe I should also submit a STH
> proposal that we can vote on after that?
>
> If both Anthony's and Zeev's proposal fail, I would recommend to just drop
> this topic for 7.0 and discuss it again for PHP 7.1. The necessary
> forward-compatibility changes to allow that are already proposed in another
> RFC.
>

Bob proposes the base common part of both other RFCs.
It actually had to be proposed in first place.
I would prefer this instead of nothing. I think many people think the same.

Thanks. Dmitry.


>
> Nikita

---

## #84601 — Stelian Mocanita — 2015-03-11T23:18:14+00:00

URL: https://externals.io/message/84580#84601 · In reply to: #84600

Dmitry,

I tend to disagree with many people wanting this over nothing. It's a big
enough topic,
that raised waives in the community, to be treated properly and not just
throw it in before
feature freeze, so I agree with Nikita on this one.

My view on it is that if both RFC's fail, the feature should not be in 7.0
and have a proper
solution for 7.x, what ever that x might be, a solution that satisfies both
internals and userland.

On that topic, it's a shame that all this work and effort might be thrown
away and at the end of
the day we would be left with nothing.

Regards,
Stelian



> On Thu, Mar 12, 2015 at 1:53 AM, Nikita Popov <nikita.ppv@gmail.com>
> wrote:
>
> > […]
> wrote:
> > […]
> proposals
> > […]
> as
> > […]
> -
> > […]
> vote
> > […]
> drop
> > […]
> another
> > […]
>
> Bob proposes the base common part of both other RFCs.
> It actually had to be proposed in first place.
> I would prefer this instead of nothing. I think many people think the same.
>
> Thanks. Dmitry.
>
>
> > […]

---

## #84617 — Markus Fischer — 2015-03-12T09:09:55+00:00

URL: https://externals.io/message/84580#84617 · In reply to: #84580

> after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail.
> 
> Thus, I'd like to come up with a fallback proposal in case both proposals fail:
> 
> https://wiki.php.net/rfc/basic_scalar_types
> 
> It shouldn't prevent any future improvements and still give use all the advantages of scalar types.

I'm not sure I'm seeing improvements over the other RFCs here ... or I
just missed something obvious. From a quick glance, this one here:

Type declration "string" and you pass in a "bool" type.

When in practive the conversion is like this:

$ php -r 'var_dump( (string) false ); var_dump( (string) true );'
string(0) ""
string(1) "1"

$ php -v
PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:11)


- Markus

---

## #84620 — Zeev Suraski — 2015-03-12T09:23:22+00:00

URL: https://externals.io/message/84580#84620 · In reply to: #84595

> -----Original Message-----
> From: Bob Weinand [mailto:bobwei9@hotmail.com]
> Sent: Thursday, March 12, 2015 12:46 AM
> To: Pierre Joye
> Cc: PHP internals
> Subject: Re: [PHP-DEV] [RFC] Basic Scalar Types
>
> Correct. It's just for the case where the other two fail.
> We still can add strict mode in a later version if people need it.
> All the RFC does is the most basic scalar type hinting you can build
everything
> on. (for example adding the declare(strict_types=1); would work without
any
> BC break on top of it)

The issue is that it's only possible to open the voting on this one until
tomorrow.

As I said, I do think we need *something* for 7.0.  I went as far as
saying that I'd change my vote on the quite-bad-IMHO dual mode RFC to yes
if it seems both present proposals aren't going to succeed.  But I would
much rather see this one pass over the dual mode if it was available for a
vote.

So really, the options we have are:

1.  Put this one for a vote before the end of tomorrow.  Here too, on a
personal level, if I see that this proposal isn't gaining enough votes,
I'd support the dual mode one.
2.  Don't put it up for a vote, and then we may or may not have something
for 7.0.

Zeev

---

## #84621 — Zeev Suraski — 2015-03-12T09:28:19+00:00

URL: https://externals.io/message/84580#84621

> So really, the options we have are:
>
> 1.  Put this one for a vote before the end of tomorrow.  Here too, on a
> personal level, if I see that this proposal isn't gaining enough votes,
I'd
> support the dual mode one.
> 2.  Don't put it up for a vote, and then we may or may not have
something
> for 7.0.

Woops - seems like I was living in the future - there's time to move to a
vote until the 15th, which incidentally is Sunday, not tomorrow.  Thanks
Nikita :)

Zeev

---

## #84622 — Arvids Godjuks — 2015-03-12T09:34:00+00:00

URL: https://externals.io/message/84580#84622 · In reply to: #84620

2015-03-12 11:23 GMT+02:00 Zeev Suraski <zeev@zend.com>:

> > […]
> everything
> > […]
> any
> > […]
>
> The issue is that it's only possible to open the voting on this one until
> tomorrow.
>
> As I said, I do think we need *something* for 7.0.  I went as far as
> saying that I'd change my vote on the quite-bad-IMHO dual mode RFC to yes
> if it seems both present proposals aren't going to succeed.  But I would
> much rather see this one pass over the dual mode if it was available for a
> vote.
>
> So really, the options we have are:
>
> 1.  Put this one for a vote before the end of tomorrow.  Here too, on a
> personal level, if I see that this proposal isn't gaining enough votes,
> I'd support the dual mode one.
> 2.  Don't put it up for a vote, and then we may or may not have something
> for 7.0.
>
> Zeev
>
> --
> 
> 
>
>
At this point I think the best way is to reserve the keywords for
typehints, and not the only 4, but also for resource and null. And work
towards making typehints in 7.1.
Rushing things like it's now never lead to any good results. And that
dual-mode RFC is re-incarnation of the register_globals, just in a
different way. But essentially will make the same mess.

---

## #84662 — Andi Gutmans — 2015-03-13T05:17:16+00:00

URL: https://externals.io/message/84580#84662 · In reply to: #84580

> 
> 
> Hi all,
> 
> after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail.
> 
> Thus, I'd like to come up with a fallback proposal in case both proposals fail:
> 
> https://wiki.php.net/rfc/basic_scalar_types
> 
> It shouldn't prevent any future improvements and still give use all the advantages of scalar types.

Agree and I would vote +1 on this even if I'd prefer coercive. 
It is a very valid option for a 7.0 and it is future proof. 

> 
> Thanks,
> Bob

---

## #84666 — Yasuo Ohgaki — 2015-03-13T08:08:13+00:00

URL: https://externals.io/message/84580#84666 · In reply to: #84662

Hi all,



> > […]
> scalar types. So, they both still possibly may fail.
> > […]
> proposals fail:
> > […]
> advantages of scalar types.
>
> Agree and I would vote +1 on this even if I'd prefer coercive.
> It is a very valid option for a 7.0 and it is future proof.


The same opinion.
I prefer coercive, but it's good enough for now.

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net

---

## #84694 — eli@eliw.com — 2015-03-13T17:20:20+00:00

URL: https://externals.io/message/84580#84694 · In reply to: #84662

Not that another +1 is needed, but I'm with Andi here.  I do personally
like this 3rd proposal as an option, if nothing else because it
implements the 'simpler base'  at the moment, and allows us, once people
are used to this being part of the language, to continue to evolve
later.  And that evolution can be based upon our real world experience
of using this 'base level' of typehinting for a while.

Versus the more complicated versions, of which both Zeev's and Anthony's
are.  In each their own way.

Eli


> Agree and I would vote +1 on this even if I'd prefer coercive. It is a
> very valid option for a 7.0 and it is future proof. 

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

---

## #84706 — Stelian Mocanita — 2015-03-13T18:33:22+00:00

URL: https://externals.io/message/84580#84706 · In reply to: #84694

So to get it clear for everyone: the right way is for internals to ignore
community as a
whole, stick to their own views and implement something nobody actually
wants - just
because there is no time -  on the idea that "something is better than
nothing"?

Without pointing any fingers it sure looks like a stalling tactic where
someone
eventually gets what they want.

Highly disappointed on this outcome.



> Not that another +1 is needed, but I'm with Andi here.  I do personally
> like this 3rd proposal as an option, if nothing else because it
> implements the 'simpler base'  at the moment, and allows us, once people
> are used to this being part of the language, to continue to evolve
> later.  And that evolution can be based upon our real world experience
> of using this 'base level' of typehinting for a while.
>
> Versus the more complicated versions, of which both Zeev's and Anthony's
> are.  In each their own way.
>
> Eli
>
> 
> > […]
>
> --
> |   Eli White   |   http://eliw.com/   |   Twitter: EliW   |

---

## #84709 — guilhermeblanco@gmail.com — 2015-03-13T18:57:35+00:00

URL: https://externals.io/message/84580#84709 · In reply to: #84706

+1 on this, as this is more inline with how ZPP currently works, creating
less headaches to end users.



> So to get it clear for everyone: the right way is for internals to ignore
> community as a
> whole, stick to their own views and implement something nobody actually
> wants - just
> because there is no time -  on the idea that "something is better than
> nothing"?
>
> Without pointing any fingers it sure looks like a stalling tactic where
> someone
> eventually gets what they want.
>
> Highly disappointed on this outcome.
>
> 
>
> > […]
>



-- 
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

---

## #84715 — Derick Rethans — 2015-03-13T20:33:56+00:00

URL: https://externals.io/message/84580#84715 · In reply to: #84709

"guilhermeblanco@gmail.com" <guilhermeblanco@gmail.com> schreef op 13 maart 2015 18:57:35 GMT+00:00:
>+1 on this, as this is more inline with how ZPP currently works,
>creating
>less headaches to end users.
>
>On Fri, Mar 13, 2015 at 2:33 PM, Stelian Mocanita <stelianm@php.net>
>wrote:
>
> > […]
>ignore
> > […]
>actually
> > […]
>than
> > […]
>where
> > […]
>personally
> > […]
>people
> > […]
>experience
> > […]
>Anthony's
> > […]
>is a
> > […]

Chance of this RFC passing is going to be slim, as it only caters for one of the three groups that Antony described...

I certainly will vote against it.

---

## #84716 — Zeev Suraski — 2015-03-13T20:44:10+00:00

URL: https://externals.io/message/84580#84716 · In reply to: #84715

> -----Original Message-----
> From: Derick Rethans [mailto:derick@php.net]
> Sent: Friday, March 13, 2015 10:34 PM
> To: guilhermeblanco@gmail.com; Stelian Mocanita
> Cc: Eli; PHP Internals List
> Subject: Re: [PHP-DEV] [RFC] Basic Scalar Types
>
>Chance of this RFC passing is going to be slim, as it only caters for one
>of the
> three groups that Antony described...
>
> I certainly will vote against it.

You may very well be right, but the only way of truly knowing would be
putting it up for a vote.  I'd feel a lot more comfortable if this was also
available for a vote before moving my nay to yay on the Dual Mode RFC.

Zeev

---

## #84717 — Benjamin Eberlei — 2015-03-13T20:50:14+00:00

URL: https://externals.io/message/84580#84717 · In reply to: #84716

> > […]
>
> You may very well be right, but the only way of truly knowing would be
> putting it up for a vote.  I'd feel a lot more comfortable if this was also
> available for a vote before moving my nay to yay on the Dual Mode RFC.
>

I don't get it.

you called Andrea out for not putting up v1 of her RFC for vote because it
had so much momentum behind it.
Instead of just doing what bwoebi did you put up another RFC that got *much
more* negative tone from the beginning.
We agree on having a vote on two RFCs, coercive and v5.
Now that coercive is the clear loser suddenly v1 must be up for vote as
well?

You had the chance to do just this.


> Zeev

---

## #84720 — Marcio Almada — 2015-03-13T21:09:29+00:00

URL: https://externals.io/message/84580#84720 · In reply to: #84716

Hi,

2015-03-13 17:44 GMT-03:00 Zeev Suraski <zeev@zend.com>:

> > […]
>
> You may very well be right, but the only way of truly knowing would be
> putting it up for a vote.  I'd feel a lot more comfortable if this was also
> available for a vote before moving my nay to yay on the Dual Mode RFC.
>
> Zeev
>
> --
> 
> 
>
>
So, are we extending the PH7 feature freeze now?

We all agreed that this couldn't be voted because all RFC votes must start
before March 15th, which is not reconcilable with the minimum 2 weeks
discussion period.

The suggestion to start yet another vote is a very disappointing attitude.
I started to contribute 2 months ago and now how can I don't loose the
trust on the RFC process if things are managed like that? This only causes
people to get demotivated to contribute to PHP and only puts the community
away.

---

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