Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81503 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74526 invoked from network); 31 Jan 2015 23:53:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2015 23:53:02 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.42 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.42 mail-pa0-f42.google.com Received: from [209.85.220.42] ([209.85.220.42:43652] helo=mail-pa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/C0-01632-EDA6DC45 for ; Sat, 31 Jan 2015 18:53:02 -0500 Received: by mail-pa0-f42.google.com with SMTP id bj1so67029803pad.1 for ; Sat, 31 Jan 2015 15:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=g7bT9hjpVVnbf+9Yf3m2VR0ETMRJZj85hIJQSL4hCDM=; b=kSKnO8v3tzkaxdj7ucpWukee+MBSsVfDpsDJtJXAEc157ATpWC7ZPnEzqJOBjKh63U cPmLG1hbH5av5ihnhNd6oH2staRMLe0unvPhzh1a5P7781sXBk1cUNDvdvuswtOFgX4D QvoY+n4HgFRyBEE0o3hrMQQoRVtCYEUrZtt3HCRIBVj2Yh1x4JDOKkK9kpQep/DM15n6 ETX+OydAdMgkSlHY+qP19ckXgLhQWZmBcZ2jzABuU8Po9+ziUSa8oEpfYb2+qUpyFEOE CkH/Pqr0OK/kIRWo9mkeIegDRXA/0JOwprhUoaQH2TKddGFV2jQeEE+k3dVj7QrCo4gy SrSw== X-Received: by 10.68.241.102 with SMTP id wh6mr19022244pbc.18.1422748379586; Sat, 31 Jan 2015 15:52:59 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id cj9sm272667pad.11.2015.01.31.15.52.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 15:52:58 -0800 (PST) Message-ID: <54CD6AD6.9080209@gmail.com> Date: Sat, 31 Jan 2015 15:52:54 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "S.A.N" , internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Use "caller" keyword, to access object caller. From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > The reason for creating circular references, usually due to the need to > bind objects. > > But this relationship can often be obtained from the context of the call. If the API behaves differently depending on who is calling it, or requires some information from the caller, it should be passed explicitly - as a parameter/method call/etc. - not hidden. Otherwise it would lead to nasty surprises when the user of the API assumes caller does not matter but the implementor assumes it does. -- Stas Malyshev smalyshev@gmail.com