2010/3/29 Trevor Parscal <[email protected]>:
> // Use messages as *magic* properties of the object
> echo "$msgSet->name says $msgSet->test";
>
While I like the idea of using magic properties for message keys,
there's one problem with it: the - character is extremely common in
message keys, but in $msgSet->foo-bar it's interpreted as the
subtraction operator. I'm not sure whether $msgSet->{foo-bar} or
$key='foo-bar'; $msgSet->{$key} works, but either way we probably want
to ban dashes from message keys (and replace them with e.g. _) if we
do end up using this syntax. This, in turn, requires renaming
thousands of messages; this is not necessarily bad software-wise, but
it's annoying and a lot of work.

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to