Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75123 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58051 invoked from network); 28 Jun 2014 13:46:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jun 2014 13:46:36 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:58371] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/D0-52706-B37CEA35 for ; Sat, 28 Jun 2014 09:46:36 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 4063B8C007B; Sat, 28 Jun 2014 09:46:33 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8NbhTXA3FpqB; Sat, 28 Jun 2014 09:46:33 -0400 (EDT) Received: from [192.168.0.15] (unknown [90.210.122.167]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id E02748C0075; Sat, 28 Jun 2014 09:46:30 -0400 (EDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: <53AEC4F0.8040307@php.net> Date: Sat, 28 Jun 2014 14:46:27 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <50E8E93D-A702-46FF-A653-9C2A23746A06@ajf.me> References: <53AEC4F0.8040307@php.net> To: Sebastian Bergmann X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] Revisiting Anonymous Classes From: ajf@ajf.me (Andrea Faulds) On 28 Jun 2014, at 14:36, Sebastian Bergmann wrote: > $o =3D new { > public function method() { > // ... > } >=20 > // ... > }; I wanted a similar syntax for object literals, but seems you had the = same idea for anonymous classes. Which makes me wonder if we need to implement the full features of a = class. Could we perhaps use a more compact, but limited, syntax for = properties and methods here? Would these dummies need private and = protected members? -- Andrea Faulds http://ajf.me/