[Ffmpeg-devel] Naming conventions

Michael Niedermayer michaelni
Tue Mar 6 15:58:53 CET 2007


Hi

On Tue, Mar 06, 2007 at 02:33:33PM -0000, M?ns Rullg?rd wrote:
> 
> Michael Niedermayer said:
> > Hi
> >
> > On Tue, Mar 06, 2007 at 01:58:24PM -0000, M?ns Rullg?rd wrote:
> >>
> >> Michael Niedermayer said:
> >> > Hi
> >> >
> >> > On Tue, Mar 06, 2007 at 02:18:17PM +0100, Baptiste Coudurier wrote:
> >> >> Michael Niedermayer wrote:
> >> >> > Hi
> >> >> >
> >> >> > On Tue, Mar 06, 2007 at 01:37:00PM +0100, Baptiste Coudurier wrote:
> >> >> > [...]
> >> >> >>> and what about
> >> >> >>>
> >> >> >>> avpicture_get_size would that be av_picture_get_size or
> >> av_picture_size_get ?
> >> >> >> av_picture_get_size, av_picture_fill, av_picture_pad ...
> >> >> >
> >> >> > why get_size? and not size_get? you mix type_action with action_type in a
> >> >> > single name
> >> >>
> >> >> I don't mix them, type: av_picture, action: get_size
> >> >
> >> > why not type: av_picture_size action: get?
> >> >
> >> > the question maters for a naming convention ...
> >> >
> >> > also what would av_new_stream() be called then?
> >> > av_format_context_new_stream() ? this is ugly
> >> >
> >> > and av_index_search_timestamp() would end with
> >> > av_stream_index_timestamp_search() or av_stream_index_search_timestamp() or
> >> > av_stream_search_index_timestamp()
> >> >
> >> > all depending on where the type ends not to mention the silly long
> >> > name
> >> > and the action is logically here on the index not on AVStream but
> >> > AVStream is the type you must pass to the function!
> >>
> >> Stop being facetious.  Please.
> >
> > huh? what is facetious? me saying that the naming convention should clearly
> > say what type and action is or me pointing at cases where your
> > suggestion is ambiguous?
> > or are you trying to say that you have no real arguments?
> > or are you trying to say that you will decide all names based on unwritten
> > rules and everyone who doesnt understand you rules is facetious?
> 
> You appear to be deliberately misunderstanding what people are saying,
> interpreting things in the most non-obvious way possible.  If you don't
> want to change anything, just say so.

i want a naming convention but it has to be approxiately understandable
and applyable by everyone that includes people who are bad at english ...
people who have a OO background and people who dont, i do think that
what a type and what a action is is interpreted differently by various
people ...

if we end up fighting on how this single line with no examples is interpreted
then it does no good at all ...

and what is obvious for you may not be obvious for all furthermore its
not my intent to change ANY existing functions ATM just to decide on a
naming convention for new things ...


> 
> > also its funny that on nut-devel you where nitpicking that the spec wasnt
> > clear enough and now you attack my for trying to clarify a really ambiguous
> > single line suggestion of a nameing convention
> 
> This is quite different.  A format spec needs to be accurate so others can
> create correct files and properly parse files they receive.  The names of
> functions are clearly written in the header files, and trying to use other
> names will give a compiler/linker error.  Functions should ideally be documented,
> and if the documentation is unclear, a user can always look at the source code.

indeed, i agree

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070306/943ebafc/attachment.pgp>



More information about the ffmpeg-devel mailing list