Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73781 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32729 invoked from network); 24 Apr 2014 18:09:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2014 18:09:47 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:57153] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/32-20919-A6359535 for ; Thu, 24 Apr 2014 14:09:47 -0400 Received: by mail-ig0-f170.google.com with SMTP id uq10so1348301igb.1 for ; Thu, 24 Apr 2014 11:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=XZQLXp8t3ddw/4tx0d4upjk9NgwJymBC45u4/n5eXoc=; b=kp8UeVR5Qphb/biTJE6Mj0ODH9sfwCx6HsL8gApUu6p1lRLIZnd+M7070+KPRrFSFu cJyqASX5HHGUWs1Pknai9gFX6Kn3xNPIg5U583G3vB3aF3+W4uDuMiX1P/gALj/PEfcM cXEkMbFg5/FQsVlYCk8QNdxAIAj0vbWMFgPYc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=XZQLXp8t3ddw/4tx0d4upjk9NgwJymBC45u4/n5eXoc=; b=gYeXeCtTJ6vokJDclwaZlhqDBvZ8hE+ylKhWBWg/wXc1h3KU/gyG7q1sh+y/oIrFeq PeMWPrtdwRdtSv9CAmCURW7LzdcK9DWiJJojxM3ohs0c0RHwWVY9e6U7Ee+xmb++MKyV zHMMqtWex0s/PkqAnV2RJStJPbzrkgSH9LVOzA/8YgSfvYC6Ghl316lDTpUZN4Qh/vA2 WWwHmc7l5jV7wkP0xbFKLu7TLQQc7OeJ1RiFmX3nqGXNh3jnj6uHk5356jLL0W5sLIhL LOof9w7iOvxmHKe36OeNtuBT7+kE/16FuyZl65BFkePiXoOtSzlaf4mBXbp4BUvMXyOr bQFA== X-Gm-Message-State: ALoCoQnpWzCGon7cSsJNwe1ZXyzKX61AF9keSIz+mSJ9QCrPaN/ShIzOjS8CwQ/hNxyWPRWoDHSB X-Received: by 10.42.185.72 with SMTP id cn8mr3009955icb.63.1398362984210; Thu, 24 Apr 2014 11:09:44 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.42.206.208 with HTTP; Thu, 24 Apr 2014 11:09:24 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 Apr 2014 11:09:24 -0700 X-Google-Sender-Auth: Rm_fuGfKZ-t-KpeABr9QFtxcBTM Message-ID: To: Daniel Lowrey , Levi Morrison Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Return Type Declarations From: aharvey@php.net (Adam Harvey) On 24 April 2014 11:04, Daniel Lowrey wrote: >> On Thu, Apr 24, 2014 at 09:59:19AM -0600, Levi Morrison wrote: > >>> - This RFC does not add, modify, or remove keywords at all; this notab= ly >>> excludes type-hints for scalars. Supporting scalar type declarations is >>> outside the scope of this RFC; if you are interested in supporting scal= ar >>> type declarations please discuss it elsewhere. > > Addressing scalar return hints in this proposal would be foolish without > also introducing scalar parameter typing. Beyond that, addressing scalars > would almost certainly doom the RFC to rejection as scalar typing is like > the Vietnam of php-src ;) Maybe the Korea =E2=80=94 there are still two sides, years after the war, a= nd occasional skirmishes. I'd say Unicode was our Vietnam. :) > At first glance this looks to me like a workable solution precisely becau= se > it allows progress while avoiding the scalar quagmire. Same. I haven't looked at the patch yet, but I like how clean (and limited in scope) this is. Levi, what's the syntax like for closures with use blocks? I can see that looking a bit weird either way, since it's presumably either: function ($foo): Bar use ($quux) {} or: function ($foo) use ($quux): Bar {} Neither are exactly ideal, but that's the hand we've dealt ourselves, I gue= ss. Adam