Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58156 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 548 invoked from network); 27 Feb 2012 16:55:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2012 16:55:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.49 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qw0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:47737] helo=mail-qw0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/9E-40985-F75BB4F4 for ; Mon, 27 Feb 2012 11:55:27 -0500 Received: by qafi29 with SMTP id i29so350022qaf.8 for ; Mon, 27 Feb 2012 08:55:25 -0800 (PST) Received-SPF: pass (google.com: domain of tyra3l@gmail.com designates 10.224.179.78 as permitted sender) client-ip=10.224.179.78; Authentication-Results: mr.google.com; spf=pass (google.com: domain of tyra3l@gmail.com designates 10.224.179.78 as permitted sender) smtp.mail=tyra3l@gmail.com; dkim=pass header.i=tyra3l@gmail.com Received: from mr.google.com ([10.224.179.78]) by 10.224.179.78 with SMTP id bp14mr9010446qab.6.1330361725150 (num_hops = 1); Mon, 27 Feb 2012 08:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dfyS+5u4GMM7GMQTdV1e8ufLix/DcdwGFIhedZND1p4=; b=GSVjj0Ge6Vdq2wM0sxwEk1Z0ccVR7nzBWQefXHzxjlsFdEkeuGtrTNK28Etp3WytZo MQOktYF0bNoz0nP4hdG6ZgpT7kY9JOEds29aa0maL69b+oP3aQdqvEeMpINi29Z7yehh UNA5nN2NQP07QLgsAbUKRi6/s82RU221AXteQ= MIME-Version: 1.0 Received: by 10.224.179.78 with SMTP id bp14mr7552431qab.6.1330361725088; Mon, 27 Feb 2012 08:55:25 -0800 (PST) Received: by 10.229.30.205 with HTTP; Mon, 27 Feb 2012 08:55:24 -0800 (PST) In-Reply-To: References: <1330357150.2159.30.camel@guybrush> Date: Mon, 27 Feb 2012 17:55:25 +0100 Message-ID: To: Michael Morris Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=20cf30363cd10bf20a04b9f4fa10 Subject: Re: [PHP-DEV] Scalar type hinting From: tyra3l@gmail.com (Ferenc Kovacs) --20cf30363cd10bf20a04b9f4fa10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2012 at 5:16 PM, Michael Morris wro= te: > So the official response is "get lost"? > > no, it is: "come back after you did your homework, and you can provide new arguments to the discussion" > I don't know about the internals implications. But from an external > API standpoint I see no problem in allowing programmers who want to > strictly enforce a variable's datatype to do so. Legacy code would > not be affected unless it was trying to use the new reserved word > "strict" > > it was discussed before, strict typing tends to be "viral", in the sense that the developer using a lib which enforces method signatures using type hinting can either: - write a lot of boiler plate code to make sure that he/she is passing the expected types (notice that strict typing would pass that burden to the api consumer, which is against the Generous on input, strict on output paradigm, plus it would generate much more work, as there are always more consumers than producers) - or simply passing those requirements up in the call chain, which is less work, but affects even more code, and in the end, turns the whole app into strict typing. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --20cf30363cd10bf20a04b9f4fa10--