This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: D language support
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> Although making the variable static limits the damage, I pretty strongly
Joel> disagree that having this inter-routine global makes the code more
Joel> readable. But, as I said, I don't see this as a blocking problem because
Joel> it's localized to an area that I hope will require little attention from
Joel> anyone but you; so I am happy to let it go provided that another Global
Joel> Maintainer says it's OK - I'll try to remember to ask Tom for his take
Joel> on it, if no one else provides an opinion...
I took another look at it.
I agree with Joel. In this case, the variables in question could easily
be replaced with function arguments.
I realize this means adding a bunch of "*"s all over the place, which is
kind of ugly. But the flip side is that globals make functions more
difficult to understand in isolation.
I also realize that this sort of thing appears elsewhere. I'd rather we
not emulate bad decisions in new code, though.
I saw a couple more style nits too, more in the next note.
Tom