Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73783 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36697 invoked from network); 24 Apr 2014 18:18:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2014 18:18:40 -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.180 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.213.180 mail-ig0-f180.google.com Received: from [209.85.213.180] ([209.85.213.180:42230] helo=mail-ig0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/23-20919-F7559535 for ; Thu, 24 Apr 2014 14:18:40 -0400 Received: by mail-ig0-f180.google.com with SMTP id c1so1240469igq.7 for ; Thu, 24 Apr 2014 11:18:36 -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=FRNu9j/E2X08hYRJudJMH7a+WpYLOZo7+GljjaruEzA=; b=oYjBpcb7HZNcrqzJk+UmYeh8oZ/dXHVanGj/+aKIqYM6AhphAhfVkRneQiMe/YQDwA xHw5Q4VTP+XWaOybNLsy+U0UnpuQtgPPqMe7dRNeZ4DtqVm6ui4zSVw4EuKiufic7Lgg w3BBa8Hv9YtA8AvR+IGjwU8WCjGlp0+JOKdug= 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=FRNu9j/E2X08hYRJudJMH7a+WpYLOZo7+GljjaruEzA=; b=Tq+R5uKvI++CbTed7WzTziGKVZC3YjlEtF0kOdIcbg1CAV7KQLKwC12GBB0IPXwOvv VJAjTjW7zplmdXAeCH23jZHggIC/EY240M3Ww5rQwIDcT8cd6buih8aX9YO92+lLEeOn kDn+AmE4z13AaE79/DeF9UKWCRtoVRqtSfNHDvQVB6PihvrmLRWe8leaE9O/odqXDbJx v1Zr+YyTE7PtnvbQHhmKJ5siSs8kpy1liou78+WFqEdXhv8Fe/52f/u6YA61Iam766m6 KEIAi5QtCh6zXem/XwLQHmQ3WFzOYRgi22nK8bgx/Aai79JsWg3Y49vqs+C6uNYeeiWa Kv3w== X-Gm-Message-State: ALoCoQmBC9KHgFOPjA+sll/+KeQ/MBIHY8rZIgSGGFr3AQ0Ecnebn7GNO0LT93DNV+Sat2bJ9xcj X-Received: by 10.42.102.201 with SMTP id j9mr3236523ico.58.1398363516757; Thu, 24 Apr 2014 11:18:36 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.42.206.208 with HTTP; Thu, 24 Apr 2014 11:18:16 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 Apr 2014 11:18:16 -0700 X-Google-Sender-Auth: 239nsQJwt4xpxlEnjHpsDG7cxo8 Message-ID: To: 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:15, Levi Morrison wrote: >> 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 >> guess. > > > I believe it is the latter: function ($foo) use ($quux): Bar {} > > I'll check with Joe Watkins. Do you have a case for one being superior to > the other? Not really =E2=80=94 I think I prefer that one slightly, but they both requ= ire a moment to parse. On the bright side, I don't see a lot of people using return type declarations with closures. Adam