Moin,
On Thursday 06 April 2006 02:20, Conrad Dunkerson wrote:
Jakob Voss wrote:
Oh my god! Is there no common sense in the English Wikipedia? Don't you have no community procedures to stop people from doing this?
- Only activate the if-construct. You can use it for optional
parameters in templates. This is the only useful application that I can think of.
I don't understand. You are (understandably) horrified by the massive 'subtract' template, but also then suggest to NOT implement Tim's 'expr' feature which would replace (and improve upon) it with a single line? Why?
I agree that the current add/subtract templates are overboard, but there are viable uses for mathematical functions. See;
http://en.wikipedia.org/w/index.php?title=Template:Yesterday&action=edi t
Now, that is about as efficient as currently possible for what it does (generate yesterday's date - including month/year changeovers and leap-days), but with mathematic evaluation it could be reduced to just a few lines. More complex capabilities = less complex pages.
That kind of 'yesterday' and 'tomorrow' logic was first introduced on English Wikipedia only a couple of weeks ago, but is already used on hundreds of pages for a variety of effects (previewing 'daily' content in advance to verify that it is formatted correctly, going back to 'yesterday's main page' to find something you saw before, browsing forward and backward through pages arranged in date order, et cetera). Heavy use is fairly good indicator of 'usefullness'.
Just because someone needs yesterday's or tomorrow's date doesn't mean you have to introduce full mathematical expressions and function logic into templates.
Wikipedia is for content, Mediawiki for the programming logic to make it happen. Seperation of code and data! I repeat it here for you:
SEPERATE THE CODE AND DATA!
There, you made me finally yell.
One of the (more practical) reasons I can give is that other wikis might want to have the same functionality (yesterday), but do not know about the template and thus will re-invent it.
Best wishes,
Tels