User talk:Jeroen De Dauw/Code style

Clarity
To enhance clarity, you might want to provide examples on the page itself rather than only linking to the PHP manual. Tisane 16:11, 21 July 2010 (UTC)

New lines
Do we really need new lines after each loop and if block, given that we already have indenting? On the other hand, I do use new lines after each method and class. I guess my concern is that if you have too many new lines, it makes it harder to read, not easier. Also, what might be examples of lines of code that are 'unrelated'? Tisane 16:14, 21 July 2010 (UTC)


 * I forgot to indicate that I meant to only add new lines around code blocks on the same level. It indeed makes no sense to have new lines when already seing the difference through indenting. An good example of making code more readible by adding spaces versus just writting it all in a big blob is function parseDMSCoordinate here. --Jeroen De Dauw 21:16, 25 July 2010 (UTC)

@since
I like almost all of your proposals, just a bit skeptical with the @since. I have noticed, you have been using this in your extensions but even if you tag something as  and in 0.2 the whole function changes and gets new arguments, I am not sure you would update it to   or add a note. One way would be using multiple @since in this case and adding a note behind that how it was different back then. Anyway, I have missed this many times in MW core, would be so much easier to keep backwards compatibility if this were documented properly! Especially for public functions but also for important constants and globals. Also, what happened to your proposal, It's from 2010 and its not integrated yet. --Danwe 12:02, 6 December 2011 (UTC)