Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49116 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80440 invoked from network); 23 Jul 2010 00:50:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2010 00:50:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=chx1975@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chx1975@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: chx1975@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:39209] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/F0-08584-937E84C4 for ; Thu, 22 Jul 2010 20:50:01 -0400 Received: by gxk25 with SMTP id 25so5782432gxk.29 for ; Thu, 22 Jul 2010 17:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=JhZ+95zsXUpjwtwyTz7mufEND4KKG2How3KnffVXIJw=; b=EM/G5ryfuFdhn67JaQkpfNXpaDUwtBg97/SEq4h9Vwf2Pj3j2fV9MBlXpPMjgPnWOk oW6upXbcho9hP3hfjF7bWX7viy2onxjs7puc1YxN7LAyPaxfrmXC0iUU5dXm1d7CZPiP Ac6+sq4k8gDyEVhbSn4WclaSQYH9XCdXgFy10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=pElS0GnGWvx2uANQGa9QhJ81RlJfhjkaAGWET2xemVaB/HGYyrb/2snaXXU/jtJFwU UKFVrPK0DjIdXP4LxcLGXvuL7a2VpFCJlHoml1rgrIp6ktXkuINOmReD8SyZRkTYn9RJ uBxGGjr12CxxywdgUcF/Eb6/zhexiUPpgFiao= Received: by 10.90.49.2 with SMTP id w2mr2821865agw.119.1279846199183; Thu, 22 Jul 2010 17:49:59 -0700 (PDT) MIME-Version: 1.0 Sender: chx1975@gmail.com Received: by 10.90.82.11 with HTTP; Thu, 22 Jul 2010 17:49:39 -0700 (PDT) In-Reply-To: References: <730E72B7-B2C3-4FF9-8138-F04659ECDB56@php.net> Date: Thu, 22 Jul 2010 17:49:39 -0700 X-Google-Sender-Auth: faJ7P2Qe-rlX7AXGLmFpoW1GYys Message-ID: To: Joel Perras Cc: Davey Shafik , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Remove variable function and method calls From: karoly@negyesi.net (Karoly Negyesi) On Thu, Jul 22, 2010 at 5:42 PM, Joel Perras wrote: > 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. So you do not consider it utterly confusing that classname::$foo classname::$foo() mean two completely different things? The first reads a property the second reads a local variable. Any time you need to backtrack when you the source code because something you tackled on after changes the meaning of the code completely is considered horribly confusing in my opinion. And then it's utterly nontrivial what new $foo() *should* do. Should it call $foo() and instantiate the class name found in the return value or should instantiate the class found in $foo? If you nuke variable function calls and method calls and replace them with call_user_func() then these go away. Regards NK