Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35336 invoked from network); 13 Apr 2016 20:03:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2016 20:03:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.164 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.164 mx208.easyname.com Received: from [212.232.25.164] ([212.232.25.164:46983] helo=mx208.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/77-26321-CF5AE075 for ; Wed, 13 Apr 2016 16:03:09 -0400 Received: from cable-81-173-133-226.netcologne.de ([81.173.133.226] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1aqR0B-00068D-MK; Wed, 13 Apr 2016 20:03:03 +0000 Reply-To: internals@lists.php.net References: <570E99AC.3090804@fleshgrinder.com> To: Levi Morrison , internals Message-ID: <570EA5EB.8090501@fleshgrinder.com> Date: Wed, 13 Apr 2016 22:02:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NSi2Id06IcQcOX3q5SAiMsdmRuCUqa4D4" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: php@fleshgrinder.com (Fleshgrinder) --NSi2Id06IcQcOX3q5SAiMsdmRuCUqa4D4 Content-Type: multipart/mixed; boundary="sD67qIueM61lUlnruQg8r1g0Fm8HKP8L4" From: Fleshgrinder Reply-To: internals@lists.php.net To: Levi Morrison , internals Message-ID: <570EA5EB.8090501@fleshgrinder.com> Subject: Re: [PHP-DEV] Re: Improving PHP's type system References: <570E99AC.3090804@fleshgrinder.com> In-Reply-To: --sD67qIueM61lUlnruQg8r1g0Fm8HKP8L4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/13/2016 9:57 PM, Levi Morrison wrote: > On Wed, Apr 13, 2016 at 1:10 PM, Fleshgrinder wr= ote: >> Nothing to add other than +1, however, didn't you already write those?= >> >> https://wiki.php.net/rfc/nullable_types >> https://wiki.php.net/rfc/union_types >> >> Or is this just an announcement that these will be finalized now? >> >> Btw. I am in favor of having the question mark as a suffix and not as = a >> prefix because it is more readable and more natural to type. >> >> function fn(string? $str): bool?; >> >> Declare a function with the name fn that takes a string argument that = is >> nullable which will return a bool or null. >> >> That is exactly how I would think about the above while writing and >> reading. :) >> >> -- >> Richard "Fleshgrinder" Fussenegger >> >=20 > I have written them but later they will be formally moved to Under > Discussion and will create new threads for them here on the mailing > list. >=20 Awesome, let me know if I can be of any help, even if it is only proof reading. This is an extremely valuable addition that I want to have. May I suggest you the following article (more of a starting point into Ceylon actually) regarding this topic: http://ceylon-lang.org/documentation/tour/types/ Ceylon is very nicely designed regarding union and intersection types and I think it can add value to learn from these people too. I am not handing out this because I think that you don't know what you are doing. The opposite is the case. However, Ceylon is very young and I don't think many people know of it; while you probably already know all the oldies who support union and intersection types. ;) --=20 Richard "Fleshgrinder" Fussenegger --sD67qIueM61lUlnruQg8r1g0Fm8HKP8L4-- --NSi2Id06IcQcOX3q5SAiMsdmRuCUqa4D4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXDqXvAAoJEOKkKcqFPVVrf+cP/3aJcrgbWU0RtJShfCRPfWh1 yCnPpJj3ftRvWkiSTd6WzaIuqjj066CULVcBroGJd8Hw84SB9AoWDrrIrH310oHa 4XlFFOT3xfANL0PNnH5htHlADEI/1adtwq/Yy9QpsMyNjeOwwd6IB6DyvGFu4XNn YEYLMOt3x1wK/2G4CFlvYv6KoExo0nJDSgKQAPM+DsawZunG4TEDWl4RwA+TFA1O p8jSfKl+O7N9sJGZLWj/8Pd2o7nsPDmwj7fAs2HcaJ3oQaSk8sFIH/yMxFz6I9YC 1XZIwzGuuImpxcJ662/x/aW7T6jLpXpc6fNIN8gJFSdWYJJc/va6O7nOhu5iaWSt 4btXxXcRZTTKPni9L/EXiX35ewXZUHkJZ2SFcDQQxxUuoW5R46SftFoyIsA09Ss1 Ffiup3LJwupS7WcRjrTMVvrEHcyLzd8+KlsBiTjIbPjrdBGO2n4cDDxEpIBiXER8 EDnpPiGQ5kFjEsv6UD6+oxRvbltq7m3DF8t3w8LP2EFr9nLaZx3tZVQgVJrlch7n pbH3XBN8FKvhTFFX6rLH6sVOt8qxbfVA5F7DmjVs3AZ3Q3wRVKO3X+gaNb9/7zBB hrOepBDXBmrHya0zgzns3qlniX10BY9YN9P22UM9Gg40HmY8FnOS60JVR1VYrLC+ QZVn+Z1KxT3gyygUuY+5 =gv6j -----END PGP SIGNATURE----- --NSi2Id06IcQcOX3q5SAiMsdmRuCUqa4D4--