"Jeroen De Dauw" posted a comment on MediaWiki.r111264.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111264#c30836

Commit summary for MediaWiki.r111264:

adding DBDataObject class after having some people review it and posting on the 
list. docs can currently be found at 
https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw/DBDataObject

Jeroen De Dauw's comment:

More complex? You have static methods instead of non-static ones. That's not 
more complex. 

What would you propose doing instead? Having some singleton like pattern and 
calling these methods on an instance of the class? This is what I am doing in 
the Contest extension because it needed to be PHP 5.2 compat, and I think it's 
rather evil to have methods that should be static be non-static like that.

> Static should be used for things that truly should be called from outside of 
> the class on a non-instance of it

I guess this is our main point of disagreement. Why do you think this is the 
case? And how does your reasoning fir in with things such as Linker::link, 
which has been made static?

> Not necessarily more sane, just lazier

This is about doing the right thing. Not about saving a line of code. No need 
to accuse me of being lazy.

_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to