In the interest of providing options for an ability to mark a method as
returning null, I have added a new patch here:
http://www.willfitch.com/php/nullable.patch
This includes a new token "T_NULLABLE". Here are a few examples:
// This is allowed
private nullable ArrayIterator getIterator()
Hi:
I noted there are a lot of tail white spaces in our codes,
it is better to remove them all, and we also should watch such ws
in furture.
a simple way to erase such ws in vim, use :%s /\s\+$//g
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
--
PHP Internals - PHP Run
Sent from my iPhone
On Dec 23, 2011, at 6:32 PM, "André Rømcke" wrote:
2011/12/23 John Crenshaw
> > From: Will Fitch [mailto:will.fi...@gmail.com]
> >
> > I would like to take this opportunity to query on a consensus:
> >
> > Would you prefer to allow methods with type hinted return values to
2011/12/23 John Crenshaw
> > From: Will Fitch [mailto:will.fi...@gmail.com]
> >
> > I would like to take this opportunity to query on a consensus:
> >
> > Would you prefer to allow methods with type hinted return values to
> return null at will, or add a marker noting that it *may* return null?
>
I have updated the RFC and patch to reflect not allowing null to be returned
unconditionally. With the current patch, I have not added any type of
indicator to allow null to be returned at all. This will allow us to discuss
things one at a time and determine whether we actually want an indicat
On Dec 23, 2011, at 4:29 PM, Robert Williams wrote:
> On 12/23/11 13:34, "Will Fitch" wrote:
>
>
>> There's still the matter of whether allowing null to be returned,
>> regardless of the situation, or using another token to identify that
>> it could return null. I'd like to know what others thi
Hello Internals,
Just before the holidays, another release candidate is ready.
The PHP team announces the availability of the fourth release
candidates of PHP 5.4.0 today. You can find the release here:
http://downloads.php.net/stas
The Windows team provides windows binaries for the release
On 12/23/11 13:34, "Will Fitch" wrote:
>There's still the matter of whether allowing null to be returned,
>regardless of the situation, or using another token to identify that
>it could return null. I'd like to know what others think. I see Stas'
>argument that you'll still have to check, but I'
Im personally not a fan of declaring multiple return values. This
defeats the purpose of being more strict. If your method may return
different values outside of the declared type, then using the standard
"function" keyword would signify mixed.
There's still the matter of whether allowing null to
That syntax is pretty readable, would there be alternatives such as:
function foo() returns Class3, array or null {
}
-Original Message-
From: Dmitri Snytkine [mailto:dsnytk...@ultralogistics.com]
Sent: Friday, December 23, 2011 7:48 AM
To: 'Ángel González'; 'PHP Developers Mailing List
Is this how it's done in Scala?
Dmitri Snytkine
Web Developer
Ultra Logistics, Inc.
Phone: (888) 220-4640 x 2097
Fax: (888) 795-6642
E-Mail: dsnytk...@ultralogistics.com
Web: www.ultralogistics.com
"A Top 100 Logistics I.T. Provider in 2011"
-Original Message-
From: Ángel González [mail
> From: Will Fitch [mailto:will.fi...@gmail.com]
>
> I would like to take this opportunity to query on a consensus:
>
> Would you prefer to allow methods with type hinted return values to return
> null at will, or add a marker noting that it *may* return null?
>
> Example: Return null at will
>
>
On Dec 22, 2011, at 18:59, "Will Fitch" wrote:
> Would you prefer to allow methods with type hinted return values to return
> null at will, or add a marker noting that it *may* return null?
My preference would be to have a marker, and when null is not allowed, if the
function tries to return i
13 matches
Mail list logo