Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92387 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36277 invoked from network); 17 Apr 2016 16:09:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2016 16:09:44 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.82 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.82 mx101.easyname.com Received: from [77.244.243.82] ([77.244.243.82:57380] helo=mx205.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/5C-32052-645B3175 for ; Sun, 17 Apr 2016 12:09:43 -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 1arpGU-0003b3-Kf; Sun, 17 Apr 2016 16:09:38 +0000 Reply-To: internals@lists.php.net References: <57136573.7070802@fleshgrinder.com> <57137F66.3080608@lsces.co.uk> <57138312.7020003@fleshgrinder.com> <57138848.70303@lsces.co.uk> <57138F9B.4030600@fleshgrinder.com> <5713B289.5090600@lsces.co.uk> To: Lester Caine , internals@lists.php.net Message-ID: <5713B539.3080806@fleshgrinder.com> Date: Sun, 17 Apr 2016 18:09:29 +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: <5713B289.5090600@lsces.co.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VvjnKR70JAq26R4TM567157Xw6T0xdGuI" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: php@fleshgrinder.com (Fleshgrinder) --VvjnKR70JAq26R4TM567157Xw6T0xdGuI Content-Type: multipart/mixed; boundary="CNG66rhhr4kt9PoOfu1tbud1HRBfuT6Mo" From: Fleshgrinder Reply-To: internals@lists.php.net To: Lester Caine , internals@lists.php.net Message-ID: <5713B539.3080806@fleshgrinder.com> Subject: Re: [PHP-DEV] Re: Improving PHP's type system References: <57136573.7070802@fleshgrinder.com> <57137F66.3080608@lsces.co.uk> <57138312.7020003@fleshgrinder.com> <57138848.70303@lsces.co.uk> <57138F9B.4030600@fleshgrinder.com> <5713B289.5090600@lsces.co.uk> In-Reply-To: <5713B289.5090600@lsces.co.uk> --CNG66rhhr4kt9PoOfu1tbud1HRBfuT6Mo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/17/2016 5:58 PM, Lester Caine wrote: > And this is where the likes of Hack should be exactly where you are > working ... The vast majority of grass roots users don't need another > layer of complexity loaded on top of what IS a perfectly functional > platform. Adding types, complicating procedure calls and lumbering > everything with 'optional' layers of complexity is not something that a= > small jobbing shop user has time to investigate the implications on his= > client base. I'm still working through code that other have written and= > trying to in many cases unravel exotic code that no longer fits the > modern programming style. I no longer take on any new clients as there > is enough work keeping my existing client base working, but there are a= > LOT of people still using PHP5.2/3 who now need help if they are ever t= o > be brought forward. >=20 > Now if you were proposing something that actually validated the data > fully rather than some very restricted 'type' elements then it might be= > worth the effort, but 'int' is only a very small part of validating a > number and we still need the rest of the validation library after you > install a replacement for that bit mf it ... >=20 Union and intersection types already get us closer to stricter data types that are flexible too. Of course they are not the best solution. I already mentioned in another mail that operator overloading is the only way to get us there. It is the only thing that allows us to create truly meaningful types. However, the problem of primitives remains, as was illustrated in this and related threads multiple types, e.g. `array|Traversable`. --=20 Richard "Fleshgrinder" Fussenegger --CNG66rhhr4kt9PoOfu1tbud1HRBfuT6Mo-- --VvjnKR70JAq26R4TM567157Xw6T0xdGuI 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 iQIcBAEBCAAGBQJXE7U+AAoJEOKkKcqFPVVrpOYP/33PlG7E8SfdpdJ9FRBYOfGg 2E8hcnSvGmSJS/t54PVi5nt2HRBexcL3ET/J/Bl9P2BOy/hXUdZaEyAttRRA/e/t n02BODfR3WBO9a5G9tbtuIevFdxLjdCm1yGoNHf9U2rAazVkhqv5meCcbz6HPcfU VXoUfKPezcvlUZkwHBlr29CYATBNOO4e4V71KUN7sztju6ASX7/qsz8qnb7Gjd45 4FWAmMsReeqFgDSxen2bHWWbapIxo+gxC2veuFyKUmSDJ0up1lxuYVWRHPK/2QBW HjZXPxvo7RcdrpFsaHutGOKW4bqbACWP5svyFp2nehIEHe6XGrznZiYVYgdNWGIC jQdl8kuFVbDkp2lXfmJIO2yq2F+O9HB67x6Eu8CtXjUDhRtM5MkbSfmMd+XnjzTt ENvHAWY2e3/THfeeJhddJGNJP5qLK9ZW09UaCky9IQS+zAydO14aKzkRb6dfxiwr a3w0PYKf+gcBHm1a4VgRpZoYlrrGbgQLv54DrcnFrhXUDSbJh8StuCmvkrx/fC5x 6rFx/OPHLRGochlxKw90uxtSwlLG9hbHnwADed+6Rs7AbLZ76bG6ode7nYCKR9o2 l9WHvGD/E+Gj+UBJ1hAHi+Ohy/0xRdkKuW5vLB6eAZy/jWBNc0FraBeTvW4hy37R uoS41wrl943TlDVUYPBL =Vr39 -----END PGP SIGNATURE----- --VvjnKR70JAq26R4TM567157Xw6T0xdGuI--