Question: Do you have any suggestions for improving names for these functions?
Since newpath and stroke cause the current point to become undefined, I usually define procedures such as
/new_path { currentpoint newpath moveto } bind def
/close_stroke { currentpoint closepath stroke moveto } bind def
However, these names are actually examples of how to write unreachable code , and I would like to call them something else, but I canβt come up with any good names (except maybe something like newpath_without_undefining_currentpoint, and then the advantage of using the procedure more or less gone).
In search of existing uses in pdf_ops.ps, the following came from ghostscript:
/ tn {currentpoint newpath moveto} bdef% Obsolete, never used.
and tn is not a better name.
Edit: What I mean, having unsupported characteristics, is that I finish newpath
and new_pathboth do the same thing, but a little differently, and there is nothing hint of anything in the names. I know that identifiers often stay short to save space, but this is not a problem for my manually written files.
source
share