Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78918 invoked from network); 23 Jul 2010 00:42:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2010 00:42:49 -0000 Authentication-Results: pb1.pair.com header.from=joel.perras@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=joel.perras@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: joel.perras@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:36453] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/A0-08584-785E84C4 for ; Thu, 22 Jul 2010 20:42:48 -0400 Received: by qwb8 with SMTP id 8so3611012qwb.29 for ; Thu, 22 Jul 2010 17:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=jQj/CyKauz3yZXzgu17iIrOcKh9WF2ZxfBBSh80UChU=; b=HUlfCcvNEAn3J6eky08MVlir8cohjhFwXZZf8OkVWrGMaQWuuCU75WxOWpzA9DEUt6 pKEHzFpxzSflu6BKJXRrLfRIWQCCTo2YOR66i002lUqS1wc2RjqWrV4Ytas6OuS01cYG ySyu2bj6dESum3RR4Uf/Ds1Rg741Qx7I99BXE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Nw6u1IEku8bvwlWueBbb8vnz70eKnNsiAodxrXI5ZfNMN3gG1flC+qG9yYBNBgMHrK 9sDSky+0zKideiWCH9RDX6hTERr+UGz9BWGGrDFdlkEz9cyNYcBD7d3vQWFZ07xwBorG rmqh+ES9rv6MnvWKFdEhNWgUYNaXz6uby//S8= Received: by 10.224.88.145 with SMTP id a17mr1893734qam.222.1279845765179; Thu, 22 Jul 2010 17:42:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.16.132 with HTTP; Thu, 22 Jul 2010 17:42:25 -0700 (PDT) In-Reply-To: References: <730E72B7-B2C3-4FF9-8138-F04659ECDB56@php.net> Date: Thu, 22 Jul 2010 20:42:25 -0400 Message-ID: To: Karoly Negyesi Cc: Davey Shafik , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Remove variable function and method calls From: joel.perras@gmail.com (Joel Perras) What's confusing about it? Each expression means something very different and distinct. I use $foo(), new $foo(), classname::$foo, classname::$foo(), $bar::$foo, $bar::$foo(), etc. on a regular basis, and it can make for some very elegant, concise and readable code. Moreover, this really isn't something you can just remove from the language. There's already a fair bit of code (including my own) out in the wild that makes use of this syntax. -j. On Thu, Jul 22, 2010 at 8:29 PM, Karoly Negyesi wrote: > On Thu, Jul 22, 2010 at 4:51 PM, Davey Shafik wrote: >> You can call classname::$foo() and even $obj->$foo() with call_user_func= (), should we get rid of those too? > > Absolutely not. > >> I grant you that variable function calls are sometimes confusing, lambda= functions are a better way to do it perhaps, but just because something ca= n be abused, doesn't mean it should be removed, unless it's impeding furthe= r innovation (a la namespaced old style constructors). > > It's not abusing it's the horribly confusing syntax. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 I do know everything, just not all at once. It's a virtual memory problem. You should follow me on Twitter: http://twitter.com/jperras