On 17 October 2016 at 21:57, Nikita Popov wrote:
> > I'm not sure I understand the motivation for throwing a deprecation
> notice
> > instead of a warning. In particular, what is the action that will be
> taken
> > here in the next major version?
>
On 18 October 2016 at 12:53, Christoph M. Becke
On 17.10.2016 at 23:09, Craig Duncan wrote:
> On 17 October 2016 at 21:57, Nikita Popov wrote:
>>
>> I'm not sure I understand the motivation for throwing a deprecation notice
>> instead of a warning. In particular, what is the action that will be taken
>> here in the next major version? I guess
On 17 October 2016 at 21:57, Nikita Popov wrote:
>
>
> I'm not sure I understand the motivation for throwing a deprecation notice
> instead of a warning. In particular, what is the action that will be taken
> here in the next major version? I guess we would throw a warning and return
> false (inst
On Mon, Oct 17, 2016 at 10:50 PM, Craig Duncan wrote:
> I've updated the RFC now to include count(null) which resolves the final
> open question.
>
> If there isn't any more feedback I'll open voting in a few days
>
> https://wiki.php.net/rfc/counting_non_countables
>
> Thanks,
> Craig
>
I'm not
I've updated the RFC now to include count(null) which resolves the final
open question.
If there isn't any more feedback I'll open voting in a few days
https://wiki.php.net/rfc/counting_non_countables
Thanks,
Craig
On 11 October 2016 at 10:49, Craig Duncan wrote:
> I've updated the RFC now to take the deprecation route, and included
> counting scalars:
>
> https://wiki.php.net/rfc/counting_non_countables
>
> The only remaining issue is what to do about handling *count(null)*
> I think this should be deprecat
I've updated the RFC now to take the deprecation route, and included
counting scalars:
https://wiki.php.net/rfc/counting_non_countables
The only remaining issue is what to do about handling *count(null)*
I think this should be deprecated too, but as it's the only case that
returns zero I wasn't s
On 4 October 2016 at 18:10, Nikita Popov wrote:
>
> A confounding factor is that count() has an alias sizeof() and for people
> coming from a C-like background it is quite natural to try to apply
> sizeof() to a string in order to get its length. This will silently "work",
> but return a meaningl
On Tue, Oct 4, 2016 at 12:29 PM, Craig Duncan wrote:
> On 4 October 2016 at 11:17, Leigh wrote:
>
> > You specifically mention that counting scalars is unaffected, is there
> > a legitimate use-case for being able to use count() on them?
> >
> > I'd say using count() on a string or an int also c
Hi,
On 04.10.16 11:32, Craig Duncan wrote:
> I'd like to propose the introduction of warning when counting objects that
> can't be counted.
>
> The default behaviour is to return 1 for these objects, which can be
> misleading and hide bugs when attempting to count iterable objects (eg
> Generator
On 4 October 2016 at 11:17, Leigh wrote:
> You specifically mention that counting scalars is unaffected, is there
> a legitimate use-case for being able to use count() on them?
>
> I'd say using count() on a string or an int also constitutes a hidden
> bug, as it also always returns 1 regardless
On 4 October 2016 at 10:32, Craig Duncan wrote:
> Hi everybody
>
> I'd like to propose the introduction of warning when counting objects that
> can't be counted.
>
> The default behaviour is to return 1 for these objects, which can be
> misleading and hide bugs when attempting to count iterable ob
12 matches
Mail list logo