Re: [AD] New API ideas

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Sorry for being late in replying to this.

> What are some things I should think about before
> submiting a patch for new API?  I think my idea
> wouldnt need to be in any vtables, so thats not an
> issue.  But are there any standards I should use?  I
> already know about AL_METHOD but what else?

It's best to simply discuss what you want to do/have in mind and post some 
code. If we don't like the style or convention, we will point it out or 
fix it ourselves if and when we apply the patch.

If you meant new API as in new_api_branch, it would be a good idea to look 
at what's been done there. I think the agreed convention was more-or-less 
prefix-verb-noun, as in al_create_bitmap, because that is fairly close to 
natural language and makes reading the code easier. This is certainly teh 
style I prefer and (try to) use myself.
Also see Grzegorz' thoughts on the subject summarised in 
http://alleg.sourceforge.net/future/discussion_of_api_style_draft_two.txt. 
It's an old document by now, but most of the discussion and points raised 
are still relevant.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/