Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104311 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64558 invoked from network); 8 Feb 2019 15:31:34 -0000 Received: from unknown (HELO cache4.mydevil.net) (213.189.55.195) by pb1.pair.com with SMTP; 8 Feb 2019 15:31:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=korulczyk.pl; s=devil; h=Content-Transfer-Encoding:Content-Type:In-Reply-To :MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YIkCYAEYb+lXuySWPmu1FNZsWuoLgHZ5dqu7/EmIe5U=; b=c6EEw+JFFUvyk2UBBJukTYlsB6 ZP8Jh+OhFZA1yDDMxJrFJkL0D2KfVHpY4Enw9TWkyw7gMF5J475wU1sYO+GXPz61Ftuaoi2Enuu2F GTaquOcf4UdiErVvxl+VHw3fxisJ2zmxAcCH3VJJbZ0Np1/YEBB68bNFFJchNZdRjd90=; To: Marco Pivetta Cc: Rasmus Schultz , PHP Internals List References: <695e24fe-386f-c11a-4bd3-81129cb9ffe2@korulczyk.pl> Message-ID: <42a5e3cb-358a-3e8e-0985-099263a57374@korulczyk.pl> Date: Fri, 8 Feb 2019 13:13:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-AV-Check: Passed X-System-Sender: robert@korulczyk.pl Subject: Re: [PHP-DEV] Mixed type-hint From: robert@korulczyk.pl (Robert Korulczyk) Sounds like an arbitrary interpretation. Treating `?mixed" as "top type" (including null) would be more practical and consistent with other type-hints. Regards, Robert Korulczyk W dniu 08.02.2019 o 12:47, Marco Pivetta pisze: > `mixed` is the "top" type, which means that it contains anything at all. See https://en.wikipedia.org/wiki/Top_type > > On Fri, 8 Feb 2019, 12:45 Robert Korulczyk wrote: > > What definition? > > Regards, > Robert Korulczyk > > W dniu 08.02.2019 o 12:37, Marco Pivetta pisze: > > Mixed includes null by definition. > > > > On Fri, 8 Feb 2019, 12:21 Robert Korulczyk > wrote: > > > >     > Without this, the mixed type-hint is basically meaningless noise, is it > >     > not? About as effective is a doc-block? > > > >     This mixed type seems to be meaningless by design since its main goal is to work the same as if it was no type-hint at all... > > > >     Another thing is that including null as part of mixed is not very pragmatic - mixed could be used to disallow null, so it will actually work > for type > >     check. > > > > > > > >     Regards, > >     Robert Korulczyk > > > >     -- > >     PHP Internals - PHP Runtime Development Mailing List > >     To unsubscribe, visit: http://www.php.net/unsub.php > > >