[MPlayer-cvslog] r24941 - trunk/mplayer.c

Uoti Urpala uoti.urpala at pp1.inet.fi
Sun Nov 4 16:37:59 CET 2007


On Sun, 2007-11-04 at 10:13 +0100, Nico Sabbi wrote:
> You are the only one that doesn't make the slighest effort to
> prevent breaking gcc 2.95, even when it would cost nothing 

It would cost in code quality. For example in this case the variable
declaration is irrelevant clutter at the start of the function, while
the type of the variable is obscured in the part of code where it is
used. I'm also not willing to make a habit of writing inferior code.

I learned C before C99 existed, and later made a conscious effort to
update my coding style to use C99 features. That's something I think
more people should do - not limited to C features but to development
practices in general. I learned that using features such as free
variable declaration placement do allow me to write better code. That's
the kind of code I want to create and practice writing.

It's easy to underestimate the importance of such language features. If
you look at any one function it usually looks easy to write and maintain
in any restricted style or even in any language. Yet over time and large
amounts of code such differences do add up.

It's also easy to overestimate the benefit of adding workarounds when
writing code. Even if it takes a bit more effort to write the function
and the resulting code is a bit worse it doesn't feel like a serious
enough burden to justify breaking compatibility with even an obsolete
compiler. However the right question to ask is not "is the ease of
writing this function worth more than support for that compiler?" but
"is the ease of writing this function worth more than prolonging support
until the next time I write a function?". Because that is the time when
either support stops anyway or you need to pay again.




More information about the MPlayer-cvslog mailing list