From: Hans-Bernhard B. <br...@ph...> - 2004-07-10 01:07:17
|
On Fri, 9 Jul 2004, Ethan Merritt wrote: > #ifdef EAM_HISTOGRAMS > /* EAM FIXME - There are places in df_readline where it would be really */ > /* nice to know what kind of plot we are making, so I think that */ > /* current_plot should be a parameter to df_readline. I strictly disagree with that reasoning. If df_readline needs to know what the the plot style is, then IMHO that's a sign that there's something seriously wrong with df_readline(). It's separations like this being broken down or "tunnelled", tieing every piece of the program to all others, that got gnuplot into the mess it's still in. Bluntly put, adding a global variable is essentially never the right solution for any problem other than stack size limitations. Instead of designing a correct structure of "who is responsible for what", creating a global means that we've given up. In the case at hand, df_readline is the core interface between the datafile itself and the next stage in data processing: the 'using' specifiers. It should never need to know anything about plot styles, which are at least two steps removed from its work. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |