[gst-devel] Re: [gst-cvs] alima gst-plugins-good: gst-plugins-good/ gst-plugins-good/ext/flac/ gst-plugins-good/gst/matroska/

Benjamin Otte in7y118 at public.uni-hamburg.de
Mon Feb 6 05:25:25 CET 2006


On Fri, 3 Feb 2006, David Schleef wrote:

> As a matter of style, I don't put any function call with side effects
> on the right hand side when simultaneously declaring and assigning
> local variables.  It's too easy to screw it up later.  I encourage
> others to do the same.
>
> (Actually, I try not to put anything non-obvious or non-trivial on
> the right hand side of assignment/declaration of local variables.
> But I'm less convinced that that is good style rather than irrational
> aversion.)
>
There seem to be quite some people that advocate such rules or even
stricter ones. I remember the DBUS people requiring declarations being
seperate from assignments in all their patches. I think they also require
all declarations at the top of the function and not in other blocks )like
if or while).

Is there a writeup of why this is good or not anywhere? I'd be interested
in why it is worthwile to pose these restrictions  on developers.

Benjamin





More information about the gstreamer-devel mailing list