Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5580 invoked from network); 18 Feb 2015 12:57:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 12:57:28 -0000 Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.171 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.214.171 mail-ob0-f171.google.com Received: from [209.85.214.171] ([209.85.214.171:39793] helo=mail-ob0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/FE-18888-63C84E45 for ; Wed, 18 Feb 2015 07:57:26 -0500 Received: by mail-ob0-f171.google.com with SMTP id gq1so1546147obb.2 for ; Wed, 18 Feb 2015 04:57:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=9h8uVl5zGkvkptDK98MKpPaOU1pJ25UhMHpDAFP7vgc=; b=O04IESIAEJbX86L+qSRM6qMl4Qlkdz7RFpUqR5sGX3p5qoobtqCyThp8HFemcnidJ8 uzXH73FMUfhQyFzbr4WStvi92gI4/o6WkkoHz2gbSJw/RxMHcVD8RWL5JSqD3uq9ex4C ZMiJUAH+uErkyPJiniEgpMC7BZBcE+AMeUqwcuN6QvNd7eo8iP6p5QUtN4wKuHM3N1lD 5VYBgWdmpzRK2KqNWAuRspaxERVMv1UjHKhkFOsSLmtxCQWJ8HZ/7ChBbwU0ngztCMH6 YjxPAcIUIm8s048SikADbASABncFcmurwxlitke8MrKQg/wPKU84Ak0b5rpJRo76l8tF dTbg== X-Received: by 10.202.46.138 with SMTP id u132mr20703929oiu.19.1424264242871; Wed, 18 Feb 2015 04:57:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.141.233 with HTTP; Wed, 18 Feb 2015 04:57:02 -0800 (PST) In-Reply-To: <54E47B63.8010602@gmail.com> References: <54E47546.5030800@php.net> <54E477FE.30901@gmail.com> <54E47A06.3010001@php.net> <54E47B63.8010602@gmail.com> Date: Wed, 18 Feb 2015 13:57:02 +0100 Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1137d4484344c9050f5c5c44 Subject: Re: [PHP-DEV] Scalar Type Hints v0.4 From: linepogl@gmail.com (Lazare Inepologlou) --001a1137d4484344c9050f5c5c44 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2015-02-18 12:45 GMT+01:00 Rowan Collins : > Michael Wallner wrote on 18/02/2015 11:39: > >> On 18/02/15 12:31, Rowan Collins wrote: >> >>> Michael Wallner wrote on 18/02/2015 11:19: >>> >>>> On 17/02/15 23:03, Sara Golemon wrote: >>>> >>>> 1) Introduce scalar types for primitives: bool, int, float, string, >>>>> resource, object (we already have array) >>>>> 1a) Introduce meta-types as pre-defined unions (we can add custom >>>>> unions in a later rfc). A possible list may be as follows (again, we >>>>> can argue what's in this list separately): >>>>> * mixed: any type >>>>> * scalar: (null|bool|int|float|string) >>>>> >>>> Hold on, usually, type checking functions don't identify NULL as scala= r. >>>> >>> No need for anyone to hold on; as it says in the section you've quoted >>> "we can argue what's in this list separately". Sara's after reactions t= o >>> the principle of having meta-types/unions in general, not their >>> definitions, right now. >>> >> Did you already incorporate "strict mode" yourself? >> SCNR >> >> I'm not a native speaker, so "hold on" might mean something different to >> you than to me. >> >> > Sorry, what I meant was, "don't worry, this isn't the kind of issue that > we need to worry about yet". > > Sara's e-mail made clear that these were quick examples, and she wasn't > expecting feedback on the details at this stage. > > Still, nullable types is something that had been proposed several times in this list, and fits nicely with the introduction of union-types. So, yes it would be nice null not to be included in scalars. Instead, we could have a union type like scalar? =3D scalar|null Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel > Regards, > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a1137d4484344c9050f5c5c44--