""S.A.N"" wrote in message news:CALW=WEDFmUXap7Bx=chhx5vyhcoi1kbahgdkjif2adlx6yt...@mail.gmail.com...

2015-02-01 1:52 GMT+02:00 Stanislav Malyshev <smalys...@gmail.com>:
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
smalys...@gmail.com

This is a controversial statement.
If  the caller explicitly send the object as an argument, it worsens
loose depending API.

And how is this different from Dependency Injection which is supposed to be a common and accepted technique?

--
Tony Marston


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to