Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38091 invoked from network); 26 Apr 2016 19:40:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2016 19:40:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.66 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.66 mail-pa0-f66.google.com Received: from [209.85.220.66] ([209.85.220.66:33867] helo=mail-pa0-f66.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/7A-20013-934CF175 for ; Tue, 26 Apr 2016 15:40:41 -0400 Received: by mail-pa0-f66.google.com with SMTP id yl2so2350255pac.1 for ; Tue, 26 Apr 2016 12:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=EEf1ykSVgRmZyRQjSLTN2WMxZ78VBI9CzB05Ytxf+Qg=; b=Bv2y3yqg4XosU1Js9AFzylaYeX2KkSX8zUAQx4qwCCkhLnvgnXhyAy8Wnei6C4a6ri e+4Ds9WBvFqMZNRBWa89+OfSuICZnLr948PmM4WeLIg63wL9l/XIPAA7Ydq3dR2yLQOz Ioym20VYYxL1bjkVLpj8kVzY6Q41KStCOHYkEFZzrE2UewmsCnwkrOwwnSEVbTbLqrNV NmFVrKm7BTHpQvXAlmnKLT3CWDXDwg4x0iLHmUaq4J3FI2ZJvSR0u3wSd5dsgCnYDhF7 Kxmcy3GOVLqzzF2D8tozcPxv+H0HvXHRBy4uKbFd5iXDpesbaaXF4iLwADtJrqwMuNk6 HAmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=EEf1ykSVgRmZyRQjSLTN2WMxZ78VBI9CzB05Ytxf+Qg=; b=OMrXW/Mk7JBOgVtpcDLujpvGbWB5Lc8enBhiPYkkkj1361CMYWGhpJMqsH+dvhWETr N6SHi9hQ/Vfxdv1SMbci1JLErrFmETNzkMuIOdAkTKJMRrB/xLfHWFkYYPrbTVjtU2rn YxuRncs+i82bdbH++kivjUxRalrURQz50rEfm1wvhwdaObTUkGM/mf0hqpsrj948XG8x q2sMGy+lX84zIVfnFOinWcTKiuOjTDlVCcueMr8xK3e370xBXQmrKish2nZnhrYm9o6f GKmtTVpxNt674fl/4dpg2RCIH5j4hVtAKhg6XAPmxtIfpWXPFTGTqt/NSbj4Coa9tctn GqFg== X-Gm-Message-State: AOPr4FVFOVqRAELzz0NyEsvDcYKZTFEpEGIAwTlfo+BqdQugPI6quPrlDrfcEV/ZVigaLFfz30eCuYBZUW2s4A== MIME-Version: 1.0 X-Received: by 10.66.217.137 with SMTP id oy9mr6155015pac.103.1461699638411; Tue, 26 Apr 2016 12:40:38 -0700 (PDT) Received: by 10.66.132.79 with HTTP; Tue, 26 Apr 2016 12:40:38 -0700 (PDT) In-Reply-To: <571FC2AF.8060003@fleshgrinder.com> References: <571F7B91.2030102@zend.com> <571FC2AF.8060003@fleshgrinder.com> Date: Tue, 26 Apr 2016 13:40:38 -0600 Message-ID: To: internals Cc: Bob Weinand , Niklas Keller Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types From: morrison.levi@gmail.com (Levi Morrison) On Tue, Apr 26, 2016 at 1:34 PM, Fleshgrinder wrote: > On 4/26/2016 9:13 PM, Bob Weinand wrote: >> There's undefined (=3D not a value) and there's the value null. We just = don't expose undefined to userland. [You see it when accessing undefined va= riables, which PHP converts to null with a notice for example.] >> >> Null is definitely a value. You can pass it around, reflect on it, assig= n it etc.. >> And as it is a value, it also has a type, which is null. >> >> Null is not special, it just has specific behavior, like any other primi= tive type has. The only special thing is that it's allowed as a default val= ue with function (Foo $foo =3D null), but this should be somewhen deprecate= d and removed once we have proper null unions. >> >> If you want to continue arguing, please open a new thread, but don't sid= e-track this thread to much, please. >> >> Bob >> > > Null is a type, no argument there! > > Deprecation of null as default value makes no sense, nor does it make > sense to deprecate 42 as default value. ;) > > -- > Richard "Fleshgrinder" Fussenegger > I think he meant to post a different case: function (Foo $foo =3D null, $concrete_param); This is based on a conversation I've had with him elsewhere.