Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83122 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48305 invoked from network); 18 Feb 2015 21:20:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 21:20:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:31506] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/0B-25021-B1205E45 for ; Wed, 18 Feb 2015 16:20:29 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id C13F04B0266; Wed, 18 Feb 2015 22:20:04 +0100 (CET) Reply-To: To: "'Rowan Collins'" , References: <032f01d04b92$2722e0d0$7568a270$@php.net> <54E4BEDA.70009@gmail.com> <036201d04ba5$6e09d6d0$4a1d8470$@php.net> <54E4E6FE.8060904@gmail.com> In-Reply-To: <54E4E6FE.8060904@gmail.com> Date: Wed, 18 Feb 2015 22:20:22 +0100 Message-ID: <039501d04bc0$b490fff0$1db2ffd0$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKz6wpj8b81mnwJq1LfxWbU4ZJyQgFU2plEApzjh9IB/ophVAG2DLlHAfH96Lea4uFygA== Content-Language: fr X-Antivirus: avast! (VPS 150218-0, 18/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Scalar Type Hints v0.4 From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Rowan Collins [mailto:rowan.collins@gmail.com] >=20 > They'd use whatever (non-reserved) namespace the implementer wanted. > e.g. >=20 > namespace Symfony\Component\TypeChecking; >=20 > basicType nonNegativeInt extends PHP\types\int { > public function isValid(int $value) { > return $value >=3D 0; > } > } >=20 > basicType PositiveInt extends nonNegativeInt { > public function isValid(nonNegativeInt $value) { > return $value !=3D 0; > } > } Interesting. But, if I understand well, these are not classes, as they = keep dealing with scalars. Or we should create an OO API to scalars, = which is a very complex project. Regards Fran=C3=A7ois