Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77296 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5243 invoked from network); 17 Sep 2014 16:01:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2014 16:01:33 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wg0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:59500] helo=mail-wg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/D7-57031-C50B9145 for ; Wed, 17 Sep 2014 12:01:33 -0400 Received: by mail-wg0-f52.google.com with SMTP id x13so1618891wgg.11 for ; Wed, 17 Sep 2014 09:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Z1F+/P+JMr9jPN6fdwUZBVTMzksc1K0rDRhiDH3sP8A=; b=RAt90F8b/S/33OvHA/cqGO7sq9t+s7kSIwavnrmhr5CdXb4DFBq3kbQY7QLkGfjw2l 4zN+XXci/0CWIxUAe0lC2oDqfhO1vNL/juZtGGxM+dNkAyIZCd3glkvsVyxdSlGwWS/w mf9BF/7vhcAr5ajIPuKunh8xixEiAEUzk2SY1fDAbnNi2bTmgvfqvIhkLDSqLCYkT1N6 Qn37TaYEhz6tWH2Kze+TVFzH+FPc8T+MICdN6pmetQmnIfFKtJP37oeaGEndJZiPQhdU z2QYQRTC11hSIxmpRSBp4T8XrNS5s8fq86k+ThlAm8FGMLCIM6/x+B+2Bs8U80SV8TQ9 jz1Q== X-Received: by 10.180.212.78 with SMTP id ni14mr6796786wic.44.1410969690439; Wed, 17 Sep 2014 09:01:30 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id u7sm6108292wif.7.2014.09.17.09.01.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Sep 2014 09:01:29 -0700 (PDT) Message-ID: <5419B057.40101@gmail.com> Date: Wed, 17 Sep 2014 17:01:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <74D45E97-4C96-41FA-B824-BCEBA056C654@ajf.me> <001101cfd1e1$c1f2df00$45d89d00$@tutteli.ch> In-Reply-To: <001101cfd1e1$c1f2df00$45d89d00$@tutteli.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: AW: [PHP-DEV] Renaming type-hints to something else? From: rowan.collins@gmail.com (Rowan Collins) Robert Stoll wrote (on 16/09/2014): > I would argue "type declaration" is wrong as well since it is not a type > declaration as it is known in other languages where the type declaration is > binding. IMO it is more a "type check". Consider the following > > function foo(Bar $b){ > $b = 1; //$b is not a Bar at all > } I tend to think of them as "type assertions", since this: function foo(Bar $b){ // do stuff } is kind of equivalent to this: function foo($b){ assert($b instanceOf Bar); // do stuff } i.e. it's a runtime-enforced check