| |
LCS-2016-015a History |
| |
6 |
| |
21-Mar-2017 |
| |
Voting |
| |
Jim Lewis |
| |
Main.JimLewis |
| |
ReportCallingPath Current File or Line |
| |
Current File or Current Line |
CURRENT_LINE rather return POSITIVE or NATURAL? The choice of one of these types would also document whether line counting is zero- or one-based.
TBP #2: As the proposed functions return values dependent on the context rather than just the immediate function parameters, I would suggest to declare them impure.
-- DIR_WORKINGDIR which returns the current working directory as a STRING. But this doesn't help with source file names which are mostly not relative to whatever. I suggest fully resolved absolute paths.
-- FILE_NAME_SIMPLE and FILE_NAME_ABSOLUTE is desirable. This operation of turning a path into a canonical representation is appearing in several LCSs, which all add it onto their actual key functionality. To name another LCS, also DIR_OPEN of LCS 006c canonizes the directory path kind of as a side effect in addition to returning a directory listing. I think it would be wiser to provide one function PATH_CANONIZE(path : STRING) returns LINE, e.g. as part of LCS 006c, that takes care of this operation once and for all.
With LCS 018, transforming an INTEGER into a STRING only takes an expression like i'image. I think with so little bother, the version of LINE_NUMBER returning a STRING directly is not really needed.
--