|
From: Daniel J S. <dan...@ie...> - 2014-11-12 06:11:24
|
[Wrote this more than a week ago, then set in aside in draft box.] On 10/29/2014 06:52 PM, Philipp K. Janert wrote: > > (This started as a discussion on heredocs, but > is really about a bigger-picture-issue. So, I'll > try to restart this thread again.) > > Recently, gnuplot has begun to acquire features > that are typical of a programming language: > > - loops and conditionals > - structured data types > - statefulness and persistence. > > I don't think this is a good trend, and I'd like > to raise awareness for what's happening. > > Gnuplot used to be a simple plotting tool - that > was its weakness, but also its strength. > > Now, gnuplot has begun to become a programming > environment. This will make gnuplot more > complicated: more complicated to learn, but > eventually also more complicated to develop for. Point taken about the simplicity of the language, but I think that argument is disconnected from the development aspect of gnuplot for a couple reasons. First, gnuplot is still one of the most compact programs I've seen. It compiles in about 45 seconds on my system and making changes and recompiling is extremely fast. Other significant programs can take tens of minutes to compile because of overheads for libraries, definitions, macros, etc. In some bigger programs I'm sometimes hesitant to touch a header file because it will mean minutes of recompiling. Second, and the more significant point, maintenance of these small features pales in comparison to the overall organization of the code. A little more OOP concepts would aid development far more than the burden of the small features. (The code has actually improved over the years. E.g., barely any global variables left.) The internal storage of data with the 2D version and 3D version is a bit of a headache. Trying to keep track of whether z is being used for dimension or color comes to mind. I wish 2D data was pretty much the same as 3D but with one dimension zero. Overall data flow from input to processing to plotting could maybe be cleaner and more flexible. The gains from code cleanup and layout would outweigh these small features, and help for new bigger features. Dan |