On Sun, Apr 24, 2016 at 2:58 AM, Levi Morrison wrote:
> On Sat, Apr 23, 2016 at 10:40 AM, Quim Calpe wrote:
>
> Option is no better than a union type with null[1]. If a language
> requires an option to be unwrapped then it can do the same with some
> type or null.
Hi Thomas,
Sorry for the delay. I was traveling last week.
By convention `return;` in PHP is an early return for a function that
returns nothing at all. I think it can be confusing when reading a
function to look at a `return;` line and have to remember to look
elsewhere to discover what that
On Sat, Apr 23, 2016 at 6:58 PM, Levi Morrison wrote:
> On Sat, Apr 23, 2016 at 10:40 AM, Quim Calpe wrote:
> > Hi Richard,
> >
> > On Sat, Apr 23, 2016 at 2:30 PM, Fleshgrinder
> wrote:
> >
> >> On 4/22/2016 11:42 AM, Quim Calpe wrote:
>
On Sat, Apr 23, 2016 at 10:40 AM, Quim Calpe wrote:
> Hi Richard,
>
> On Sat, Apr 23, 2016 at 2:30 PM, Fleshgrinder wrote:
>
>> On 4/22/2016 11:42 AM, Quim Calpe wrote:
>> > IMHO, the point of Optional types is the intention, if you get an
>> > Option from
Hi Richard,
On Sat, Apr 23, 2016 at 2:30 PM, Fleshgrinder wrote:
> On 4/22/2016 11:42 AM, Quim Calpe wrote:
> > IMHO, the point of Optional types is the intention, if you get an
> > Option from a method, you have to deal with a None branch. Of course
> > you can just
On 4/22/2016 11:42 AM, Quim Calpe wrote:
> IMHO, the point of Optional types is the intention, if you get an
> Option from a method, you have to deal with a None branch. Of course
> you can just unwrap and go on, but it's a developer decision to do that,
> not an oversight as using a Foo|null (or
On Thu, Apr 21, 2016 at 9:52 PM, Fleshgrinder wrote:
> On 4/21/2016 1:00 PM, Lin Yo-An wrote:
> > I think this is not to make PHP like Java, and it totally makes sense -
> > Nullable should be a type of a type instead of a state. In Haskell it's
> > named Maybe or Option,
> Note that the same /would/ be possible with union types if given precedence:
>
> function fn(): int|false {}
false is currently not supported in the union_types rfc.
Regards
Thomas
Fleshgrinder wrote on 21.04.2016 21:33:
> On 4/21/2016 6:33 PM, Thomas Bley wrote:
>> Hello Tom,
>>
>> with
On 4/21/2016 1:00 PM, Lin Yo-An wrote:
> I think this is not to make PHP like Java, and it totally makes sense -
> Nullable should be a type of a type instead of a state. In Haskell it's
> named Maybe or Option, and It's better than NullPointerException.
>
> Here is a discussion from Haskell
On 4/21/2016 6:33 PM, Thomas Bley wrote:
> Hello Tom,
>
> with default return value I mean to return a certain value if nothing else is
> returned (similar to method parameters with a default value).
>
> example 1:
>
> declare(strict_types=0);
>
> function my_strpos(string $haystack, string
Hello Tom,
with default return value I mean to return a certain value if nothing else is
returned (similar to method parameters with a default value).
example 1:
declare(strict_types=0);
function my_strpos(string $haystack, string $needle): int = false {
return 42; // return 42
return
omeone may like this,
someone not.
Thanks. Dmitry.
From: guilhermebla...@gmail.com <guilhermebla...@gmail.com>
Sent: Wednesday, April 20, 2016 18:05
To: Lin Yo-An
Cc: Dmitry Stogov; Tom Worster; internals
Subject: Re: [PHP-DEV] [RFC] Nullable Types
I read the RFC and I want to hi
Hi Thomas,
What is a default return declaration? Is this for branches within the function
that do not lead to a return statement?
Tom
From: Thomas Bley
Sent: Wednesday, April 20, 2016 12:53 PM
To: guilhermebla...@gmail.com, cornelius.h...@gmail.com, dmi...@zend.com
Cc:
On Wed, Apr 20, 2016 at 11:05 PM, guilhermebla...@gmail.com <
guilhermebla...@gmail.com> wrote:
>
> Dmitry is even involved in the discussion of having IS_UNDEF until
> constructor ends, then enforcing type hinting at the end of constructor to
> trigger potential invalid instance state. It created
On Wed, Apr 20, 2016 at 11:55 AM, Jesse Schalken wrote:
> I read the RFC and it all sounds good to me. I appreciate the care taken to
> ensure method compatibility rules are correct, a smooth interop with =null,
> and to consider impact on union types if added later (?
I read the RFC and it all sounds good to me. I appreciate the care taken to
ensure method compatibility rules are correct, a smooth interop with =null,
and to consider impact on union types if added later (? just becomes sugar).
I'm not sure if it's been mentioned or not, but the position of the
com>
> *Sent:* Wednesday, April 20, 2016 18:05
> *To:* Lin Yo-An
> *Cc:* Dmitry Stogov; Tom Worster; internals
> *Subject:* Re: [PHP-DEV] [RFC] Nullable Types
>
> I read the RFC and I want to highlight why I'll vote -1 on it even before
> it goes to voting.
>
> IM
s,
> someone not.
>
>
> Thanks. Dmitry.
>
>
> From: guilhermebla...@gmail.com <guilhermebla...@gmail.com>
> Sent: Wednesday, April 20, 2016 18:05
> To: Lin Yo-An
> Cc: Dmitry Stogov; Tom Worster; internals
> Subject: Re: [PHP-DEV] [RFC] Nullable Types
o may make sense. Someone may like this,
someone not.
Thanks. Dmitry.
From: guilhermebla...@gmail.com <guilhermebla...@gmail.com>
Sent: Wednesday, April 20, 2016 18:05
To: Lin Yo-An
Cc: Dmitry Stogov; Tom Worster; internals
Subject: Re: [PHP-DEV] [RFC] Nullab
I read the RFC and I want to highlight why I'll vote -1 on it even before
it goes to voting.
IMHO, it looks backwards to what the language is progressing. The
introduction of nullable type hint as a separate notation than a simple
type hint makes it *very* hard to implement typed properties,
On Mon, Apr 18, 2016 at 4:59 PM, Dmitry Stogov wrote:
> The grammar is taken from HHVM.
> Using any other would make more mess.
>
I agree
The grammar is taken from HHVM.
Using any other would make more mess.
Thanks. Dmitry.
From: Tom Worster <f...@thefsb.org>
Sent: Saturday, April 16, 2016 04:54
To: Dmitry Stogov; internals
Subject: Re: [PHP-DEV] [RFC] Nullable Types
On 4/15/16 1
Den 2016-04-15 kl. 19:58, skrev Dmitry Stogov:
A week ago, I actually wrote my own RFC
https://wiki.php.net/rfc/nullable_return_types
but didn't push it for discussion in favor of Levi's nullable_type RFC (they
are almost the same).
I'm sure, union types bring too many conceptual and
On 14/04/16 04:42, Levi Morrison wrote:
> There are precedents in several languages for each position. Some
> relevant issues to where the question mark goes are noted in the
> RFC[3].
Another discussion reference ...
http://www.firebirdsql.org/manual/nullguide.html
On 4/15/16 1:58 PM, Dmitry Stogov wrote:
A week ago, I actually wrote my own RFC
https://wiki.php.net/rfc/nullable_return_types
You proposed the ?Something grammar. With ?: and ?? appearing in recent
PHP and proposals for ??= if not ?:= and now this, I feel we're heading
to regex hell :p
On 15/04/16 18:58, Dmitry Stogov wrote:
> I'm sure, union types bring too many conceptual and implementation questions,
> and I even don't speak abut intersections.
The one problem I see with all of this is that it is reliant on every
single variable being passed in when in early PHP5 days the
intersections.
Thanks. Dmitry.
From: Tom Worster <f...@thefsb.org>
Sent: Friday, April 15, 2016 20:17
To: Dmitry Stogov; internals
Subject: Re: [PHP-DEV] [RFC] Nullable Types
On 4/14/16 3:50 AM, Dmitry Stogov wrote:
> The up to date imple
On 4/14/16 3:50 AM, Dmitry Stogov wrote:
The up to date implementation for return-type-hints may be found at
https://github.com/php/php-src/pull/1851/files
Splendid!
Thank you, Dmitry. I will refer to it in the nullable_returns RFC[1].
Tom
[1] https://wiki.php.net/rfc/nullable_returns
--
On 4/14/2016 5:42 AM, Levi Morrison wrote:
> As alluded to in an earlier email today[1] I am now moving the
> Nullable Types RFC[2] to the discussion phase. In a nutshell this RFC
> proposes syntax for declaring a type to alternatively be null.
>
> There is a decision that needs to be made: does
On 14/04/16 10:59, Davey Shafik wrote:
On Thu, Apr 14, 2016 at 2:00 AM, Derick Rethans wrote:
On Wed, 13 Apr 2016, Levi Morrison wrote:
As alluded to in an earlier email today[1] I am now moving the
Nullable Types RFC[2] to the discussion phase. In a nutshell this RFC
On Thu, Apr 14, 2016 at 2:00 AM, Derick Rethans wrote:
> On Wed, 13 Apr 2016, Levi Morrison wrote:
>
> > As alluded to in an earlier email today[1] I am now moving the
> > Nullable Types RFC[2] to the discussion phase. In a nutshell this RFC
> > proposes syntax for declaring a
On Wed, 13 Apr 2016, Levi Morrison wrote:
> As alluded to in an earlier email today[1] I am now moving the
> Nullable Types RFC[2] to the discussion phase. In a nutshell this RFC
> proposes syntax for declaring a type to alternatively be null.
>
> There is a decision that needs to be made: does
On 04/14/2016 06:42 AM, Levi Morrison wrote:
As alluded to in an earlier email today[1] I am now moving the
Nullable Types RFC[2] to the discussion phase. In a nutshell this RFC
proposes syntax for declaring a type to alternatively be null.
+1
The up to date implementation for
33 matches
Mail list logo