[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [SPAM: 3.000] [pygame] thinking of changing gfxdraw module...



On 06/01/2011 02:11 AM, Eamonn McHugh-Roohr wrote:


On Tue, May 31, 2011 at 5:40 PM, Ian Mallett <geometrian@xxxxxxxxx
<mailto:geometrian@xxxxxxxxx>> wrote:

    On Tue, May 31, 2011 at 2:02 PM, Greg Ewing
    <greg.ewing@xxxxxxxxxxxxxxxx <mailto:greg.ewing@xxxxxxxxxxxxxxxx>>
    wrote:

        -1 if this means I'd have to build a list if I just want
        to draw one item, because that introduces inefficiencies
        of its own and makes the code less clear.

    I agree somewhat.  I definitely think that there should be a way to
    draw many items simultaneously, but I also think that there should
    be a nice way to draw one item singly as well.

I agree with Mallett-keeping the existing method in addition to the new
method would probably be better.

I don't think it's a good idea to break such a fundamental API like drawing primitives without notice. I would suggest adding the new API which take the sequence argument and document it. Also add a notice to the documentation of the old API that it is deprecated and one should use the new and improved API.
On the next release you can then remove it.
I wouldn't wait longer than one release with the removal because the way I see it there are two kind of people: 1) The ones living on the bleeding edge. When the new API is published and they see the other one is deprecated they'll port their code before the next release comes along. 2) The "don't change a running system" folks. They'll only port their code when they are forced to. One could arguee that for their sake you should keep the old API indefinately. I'm not in favour of such policy. Keep your lib and API clean and slim. (maybe you can tell that I consider myself as a person belonging to category 1. so I do have a bias).

So in essence my two cents:
In the next release:
 * add the new API
 * add docs for the new API
 * mark the old API as deprecated in code and in docs
 * explicitly mention that the old API will be removed in the next release
 * provide examples on how to port legacy code.
 * mention the transion on the webpage
In the release folling that:
 * kill the old API. no mercy.
* if somebody complains point them to the relevant docs, news posting and mailinglist discusion and wash your hands clean.

cheers,
Lorenz