|
From: Hans-Bernhard B. <br...@ph...> - 2005-08-16 20:37:50
|
Daniel J Sebald wrote: > [Hans' point] >> Now imagine somebody who just happens to have an old gnuplot script >> that defines all of the above variables equals to 5. Or to 1/0, for that >> matter, or 1.0e300. > My first question is Why are you defining "unlimited" to mean 5? I'm not. But some user very well might have a perfectly valid reason for doing so. He might even have decided to use it as an expression in some place where the current code expects a number, just because he could. This would be even worse with the single-letter alternatives I've seen mentioned elsewhere in this thread. > Second question is how popular is the redefining of keywords? It's not --- because it's impossible. But OTOH, "unlimited" has never been a keyword in gnuplot before, so if you introduce it now, you always run the risk of colliding with existing user-defined variables or functions. The point is that any syntax that allows either a keyword or a number in a given position of the command introduces a parsing ambiguity, because we generally allow numeric variables to be used in *every* place where a numeric constant could be, and such variables are essentially indistinguishable from keywords. User-defined variables and functions have been in gnuplot effectively forever. Which means that in case of a parsing conflict, they must take precedence, or we risk breaking users' scripts for no valid reasons. |