[PD-dev] [ pure-data-Bugs-1371511 ] declaration of `y1' shadows a global declaration

IOhannes m zmoelnig zmoelnig at iem.at
Thu Oct 19 10:02:34 CEST 2006


Hans-Christoph Steiner wrote:
> 
> I think its a really bad idea to name functions using names that have 
> existing in standard headers for decades, especially when that header is 

i do not recall any function in pd with a name "y1()".
it is a simple stupid variable, with a _quite_ descriptive name (e.g. 
"upperleft_y" would be more descriptive)

> used in the same project.  So must more C devs since gcc warns of this 
> condition by default.  The warning should stay so that we don't get more 
> such conditions.

well, having variable shadowing others is not the end of the world.
one of the benefits of variable shadowing is locality. at the same time 
this is it's curse.

after all, we have been discussing to get a similar mechanism into pd 
for ages (think namespaces without prefixes!). maybe we should rethink this.


> fixed soon doesn't seem like the good solution to me.  Instead it should 
> be set to "Postponed", "later", "Remind", "Wont Fix", something that 
> communicates why its being ignored and makes it easy to find in the future.

i am with you.

mfga.sdr
IOhannes




More information about the Pd-dev mailing list