On 24.10.2013, 6:54 Chad wrote:

> On Wed, Oct 23, 2013 at 7:39 PM, Tim Starling <[email protected]>wrote:

>> I'm inclined to accept this RFC, except perhaps with minor changes. It
>> would be nice if I could get some comments on it from someone other
>> than me or Daniel, but if nobody else has anything to say, I will just
>> accept it.
>>
>>
> I've personally not been convinced of this Value/Parser/Formatter pattern
> but if I'm the only one I'll just keep my big mouth shut.

My main problem with this proposal is that it aims to make us all very
good typists, by making every popular operation much more verbose.

Now:

$title = Title::newFromText( $text );
if ( $title ) {
     return $title->getLocalUrl( 'foo=bar' );
}
return null;

Proposed:

$tp = new TextTitleParser();
try {
    $title = $tp->parse( $text );
    $tf = new UrlTitleFormatter( $title, 'foo=bar );
    return $tf->format();
} catch( MWException ) {
    return null;
}

Which of them is more clear? Writing which of them you're less likely
to introduce errors?

Also, http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html


-- 
Best regards,
  Max Semenik ([[User:MaxSem]])


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

Reply via email to