Le 29/10/2015 01:08, Andrea Faulds a écrit :
Hi everyone,
The vote can be found here:
https://wiki.php.net/rfc/void_return_type#vote
Hi,
At AFUP, we would be +1 on this RFC, mostly because adding this kind of
static check could help detecting a few mistakes here and there.
Thanks for
Hi Pascal,
Pascal MARTIN, AFUP wrote:
At AFUP, we would be +1 on this RFC, mostly because adding this kind of
static check could help detecting a few mistakes here and there.
Thanks for your work on this, and welcome back!
I'm glad you appreciate it.
By the way, I think it's great that you
On 10/29/2015 07:44 AM, Dan Ackroyd wrote:
Hi Internals,
Stanislav Malyshev wrote:
every PHP function actually returns
something (at least null). So this type would not actually be right and
would not reflect what actually is happening.
Well obviously we would need to have a followup RFC to
Hi,
I'm still not sure why we are using void as the return type and not null.
Null matches behaviour, void just adds another keyword without value.
~C
On 30 October 2015 at 04:33, Rasmus Lerdorf wrote:
> On 10/29/2015 08:55 PM, Stanislav Malyshev wrote:
> > Hi!
> >
> >>
There are two particular semantic advantages of void functions I’m not sure
have been brought up.
A function that always throws an exception can’t have a return value (and
checking for one is also semantically and logically incorrect). Since such a
function won’t ever return by normal means,
Hi,
>
> That's what I am having issue with. I don't see the case where such
> guarantee is useful. If you're not using the return value, why do you
> care if it's always null or sometimes null and sometimes baloney
> sandwich? If you need always null, you have it: null. You don't need to
> use
On 29 October 2015 at 12:48, Pedro Cordeiro wrote:
> Like I said in a previous post, there is no need to forbid using a void
> function return value.
>
> Throwing an E_NOTICE would be sufficient to inform the developer he's doing
> something weird
To me, that is not really
On 29 October 2015 at 12:52, Stanislav Malyshev wrote:
> I don't think we should do either. The whole story bases on the premise
> that it is very important to avoid functions that accidentally return
> non-null value.
I don't think we should do either. The whole story bases
Like I said in a previous post, there is no need to forbid using a void
function return value.
Throwing an E_NOTICE would be sufficient to inform the developer he's doing
something weird (using the return value from a function that, by
definition, shouldn't have any return value) without breaking
On 29 October 2015 at 06:24, Marcio Almada wrote:
> Welcome back, Andrea! It's great to see you contributing here again :)
+1. :)
> 1) functions declared with "void" return type will still return
> "null", so "void" is a big fat lie for PHP while "null" is currently
>
Pedro, your email client snipped off the internals CC
On 29 October 2015 at 13:11, Pedro Cordeiro wrote:
> If that callback is actually a void function, then using its return value IS
> an error. The same way using a variable you're not sure exists, using a
> return value
Dan,
On Thu, Oct 29, 2015 at 9:22 AM, Dan Ackroyd wrote:
> Pedro, your email client snipped off the internals CC
>
> On 29 October 2015 at 13:11, Pedro Cordeiro wrote:
>> If that callback is actually a void function, then using its return value IS
Hi!
> type (or pseudo-type) to do this. We should add null as a return type
> rather than void as null:
I don't think we should do either. The whole story bases on the premise
that it is very important to avoid functions that accidentally return
non-null value. I do not think this premise is
Hi!
> The use case is that it allows better static analysis
Any analyzer worth its bytes would know whether the function returns
non-null values (as opposed to whether you declared it to return it, the
former being much more useful). However, more important point that I
think introducing
Hi,
Stanislav Malyshev wrote:
Hi!
There is a quite important use-case I've been informed of (alas I cannot
recall who by), and it was one of the things that motivated me to revive
the RFC. For interfaces, it's important to be strict in your
definitions, so you don't end up with
Hi Stas,
Stanislav Malyshev wrote:
Hi!
type (or pseudo-type) to do this. We should add null as a return type
rather than void as null:
I don't think we should do either. The whole story bases on the premise
that it is very important to avoid functions that accidentally return
non-null
Hi,
Levi Morrison wrote:
On Wed, Oct 28, 2015 at 8:17 PM, François Laupretre wrote:
Hi Andrea,
Le 29/10/2015 01:08, Andrea Faulds a écrit :
The vote can be found here:
https://wiki.php.net/rfc/void_return_type#vote
Just voted +1 as, unlike some :), I like the idea of
Hi!
> There is a quite important use-case I've been informed of (alas I cannot
> recall who by), and it was one of the things that motivated me to revive
> the RFC. For interfaces, it's important to be strict in your
> definitions, so you don't end up with implementation-defined behaviour
> that
Hi!
> Well yes, but the interface description currently says that it'll return
> a value of some unspecified type. That's what omitting the return type
> declaration does.
No, it doesn't do that. It doesn't do anything - it just provides no
information. If you rely on it to return something,
Am 29.10.15 um 01:44 schrieb Bob Weinand:
>> Am 29.10.2015 um 01:08 schrieb Andrea Faulds :
>>
>> Hi everyone,
>>
>> It’s been two weeks, so voting on this RFC can start. The rules are as
>> usual. This is a language change, so a 2/3 majority is required.
>>
>> The vote can be found
Hi!
> "void" or "null" as return type would give a 100% guarantee that every
> possible
> implementation of a given interface won't return any random value. Then it
> would
> make no difference if the returned value is being used or not, as it
> would always
> be null.
>
> So, it obviously
On 10/29/2015 08:55 PM, Stanislav Malyshev wrote:
> Hi!
>
>> "void" or "null" as return type would give a 100% guarantee that every
>> possible
>> implementation of a given interface won't return any random value. Then it
>> would
>> make no difference if the returned value is being used or
Hi,
2015-10-29 17:43 GMT-03:00 Stanislav Malyshev :
> Hi!
>
>> Well yes, but the interface description currently says that it'll return
>> a value of some unspecified type. That's what omitting the return type
>> declaration does.
>
> No, it doesn't do that. It doesn't do
Hi Andrea,
Le 29/10/2015 01:08, Andrea Faulds a écrit :
The vote can be found here:
https://wiki.php.net/rfc/void_return_type#vote
Just voted +1 as, unlike some :), I like the idea of distinguishing void
from null.
Is it too late to add a note in the RFC, listing the possibility, in the
On Wed, Oct 28, 2015 at 8:17 PM, François Laupretre wrote:
> Hi Andrea,
>
> Le 29/10/2015 01:08, Andrea Faulds a écrit :
>>
>>
>> The vote can be found here:
>>
>> https://wiki.php.net/rfc/void_return_type#vote
>
>
> Just voted +1 as, unlike some :), I like the idea of
Hi,
Welcome back, Andrea! It's great to see you contributing here again :)
2015-10-28 21:08 GMT-03:00 Andrea Faulds :
> Hi everyone,
>
> It’s been two weeks, so voting on this RFC can start. The rules are as
> usual. This is a language change, so a 2/3 majority is required.
>
> The
Hi everyone,
Its been two weeks, so voting on this RFC can start. The rules are as
usual. This is a language change, so a 2/3 majority is required.
The vote can be found here:
https://wiki.php.net/rfc/void_return_type#vote
Voting starts today (2015-10-28) and will end next Sunday
> Am 29.10.2015 um 01:08 schrieb Andrea Faulds :
>
> Hi everyone,
>
> Its been two weeks, so voting on this RFC can start. The rules are as usual.
> This is a language change, so a 2/3 majority is required.
>
> The vote can be found here:
>
>
28 matches
Mail list logo