Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77181 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8277 invoked from network); 14 Sep 2014 14:56:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2014 14:56:43 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:58878] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/E7-53483-9ACA5145 for ; Sun, 14 Sep 2014 10:56:43 -0400 Received: by mail-ob0-f175.google.com with SMTP id vb8so841088obc.34 for ; Sun, 14 Sep 2014 07:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DTBJvPOKk5nwmohfO3an1YkEAknf3Zw9ViZVz3H3nmI=; b=Zzaouw+p2jJhotRUQN5+6ara6noyQQWSvBvox6uZMSgAhMpM6HPRJzyyhIMMYnRXcQ BKPL6AMFNycH3AeRn3bqz3PbpoPSLg3H5UWbd/N+ruzvu/VkgsyZ3aTrSHumYOik+8Bu 8V4DXp/H+10j5pt9d1pCFIZq/yR7j8ZZuySS0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=DTBJvPOKk5nwmohfO3an1YkEAknf3Zw9ViZVz3H3nmI=; b=RtW0I+Vn+lGL7EgRD6/iVo5LKxJtJ7uexQg4g4YzngLhO2GVrg3kz1TpR0ohB9paUJ whVWtSq8JgQ/3H28U8jwWrKrCTeGSiq5hwwwquBNSj6YrVoDshe9YcSei8BXwi8uaEuJ VH6PO1zh5tHxydbfDNpWpOMF8LtbahHxWzjXw0MhBW6bguGYovXjmgX2Ukyy0lzrrpjk vH11SzJkFupZ7mOZ564R4DusSIkTlXPsAfUiEJOkgHpLcZ7QvJOAn0Mj/qUgrXwgUnsw t9BzlR4/CfLbPj9lIwC2DCbiLf5wEOPSFESNXGEpcuktDeuB3lLFY3g39ag+4bftbMnT sHaA== X-Gm-Message-State: ALoCoQlaf96zQNLVh3A/RMXlYujO8QBR6o3Zea8rfxrTNA8U6QflmXi7JagwPmNgDxHYY6+baOOe MIME-Version: 1.0 X-Received: by 10.182.111.229 with SMTP id il5mr20920993obb.3.1410706599199; Sun, 14 Sep 2014 07:56:39 -0700 (PDT) Received: by 10.202.75.205 with HTTP; Sun, 14 Sep 2014 07:56:39 -0700 (PDT) In-Reply-To: <6f2236e18c61d30b247e1c6bb2de10f1@mail.gmail.com> References: <6893A97A-EC4C-4124-B804-96E2A26B953F@ajf.me> <20140914000718.GB14312@phcomp.co.uk> <3177B936-50C1-4E5D-8687-FD235C72B411@ajf.me> <54153692.7050500@sugarcrm.com> <9CE963B0-E624-4267-BC2A-0F8D1F985DAE@ajf.me> <6f2236e18c61d30b247e1c6bb2de10f1@mail.gmail.com> Date: Sun, 14 Sep 2014 17:56:39 +0300 Message-ID: To: Zeev Suraski Cc: Andrea Faulds , Stas Malyshev , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast From: narf@devilix.net (Andrey Andreev) Hi, As a userland guy, I'm against this one. It seems a bit political ... A lot of people want either strict type hints or type casting hints, but because the people on this list can't get to agree on any of the two, this RFC tries to make a compromise that, IMO, satisfies nobody. It's done not for the benefit of everybody, but just so we can say that PHP has "scalar type hints". I've said this in the RFC discussion thread: In order to satisfy both sides, instead of arguing which is the one and true way, just implement both. That is also why I suggested altering the proposed syntax here from: function foo(int $bar) to: function foo((int) $bar) Whether it applies more strict rules or not, this RFC is clearly about type _casting_ hints, while the used syntax has so far only been used for strict type hints. I know some would argue that this is a side effect because you can't cast to a specific class type, but that's not the point - the result is a strict type hint and that's what people are used to. This is both inconsistent AND prevents PHP from having strict scalar type hints in the future (because of the used syntax). I (and I'm sure many others) would love both features separately, not a hacky mix between the two. Cheers, Andrey.