Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76333 invoked from network); 4 Feb 2015 09:31:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2015 09:31:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.238 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.238 mail-2.de-punkt.de Received: from [93.190.64.238] ([93.190.64.238:58276] helo=mail-99.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/84-55046-FE6E1D45 for ; Wed, 04 Feb 2015 04:31:29 -0500 Received: from localhost (localhost [127.0.0.1]) by mail-99.de-punkt.de (Postfix) with ESMTP id 1C15E3A2D8 for ; Wed, 4 Feb 2015 10:31:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail-2.de-punkt.de Received: from mail-99.de-punkt.de ([127.0.0.1]) by localhost (mail-2.de-punkt.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DcU0lu__Ep0L for ; Wed, 4 Feb 2015 10:31:24 +0100 (CET) Received: from [192.168.178.24] (p4FC7CA4C.dip0.t-ipconnect.de [79.199.202.76]) (Authenticated sender: php@sebastian-bergmann.de) by mail-99.de-punkt.de (Postfix) with ESMTPSA id BC3D03A274 for ; Wed, 4 Feb 2015 10:31:23 +0100 (CET) Message-ID: <54D1E6EC.7060702@php.net> Date: Wed, 04 Feb 2015 10:31:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <00c101d04049$ca411ec0$5ec35c40$@tekwire.net> <54D1CA7C.8060204@php.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] What do we need strict scalar type hints for? From: sebastian@php.net (Sebastian Bergmann) Am 04.02.2015 um 10:25 schrieb Dmitry Stogov: > Do you like the proposal with declare() switch? No, I do not like that. We are talking about adding support for scalars (string, integer, ...) to the list of optional type declarations already supported (array, callable, interface name, class name) by PHP. When a developer chooses to use a scalar type in the signature of a function or method then it should be enforced as strictly as the already supported types. It should be up the caller to perform explicit type casting when required.