Hi Dmitry,

It's preferred to have flexible scalars, that way we can interchange
between a numerical string or an integer.

Over defining on such things loses the powerfulness of PHP. So scalar
typehints are detrimental rather than useful. Saying something is a scalar
or not, is useful however! :)

A use case would be where scalar type hints are detrimental are:

I implement an API that returns integers for entity ids, like 2,3,4,5,6.
and my web-frontend handles this fine because it's a scalar. Then, you want
to convert entity ids to  UUID. This would break your entire web frontend
application since it's no longer "integer" whereas the concept of $id is
good enough.

Did this make sense?

TL;DR - I am against such proposals.

Many thanks,
Paul





On Mon, Feb 2, 2015 at 9:12 AM, Dmitry Stogov <dmi...@zend.com> wrote:

> hi,
>
> could you please write down few use cases, when strict scalar type hints
> are really useful.
>
> Thanks. Dmitry.
>

Reply via email to