On Mon, Mar 29, 2010 at 5:44 PM, Niklas Laxström
<niklas.laxstrom(a)gmail.com> wrote:
* I don't
like the idea of passing parameters through a call chain –
it's just not how things are really done in PHP, and it leads to all
sorts of bizarre behaviour (like the bug mentioned above). It's not
really in conformance with standard MediaWiki syntax. I don't see that
it confers any advantages over named parameters.
If you can't do everything in one call (or chain of calls), you need
to create temporary variables. I bet people are not going to like that
either.
Call chains are very flexible and readable (in my opinion at least).
It could be possible to add parameters already in Message::key(). It
actually already allows that, but as an array. I'd actually prefer if
it too took varargs instead, since I dislike PHP's array syntax.
I guess I don't take issue with the syntax so much as the
implementation, it doesn't behave as you would expect it to.
My proposal allows the use of chained syntax without the awkward
behaviour illustrated by Roan.
--
Andrew Garrett
http://werdn.us/