
Hi John, On Thu, Jul 14, 2005 at 01:32:15PM +0100, John Maddock wrote: [snip]
At present I can't think of any real world use cases where a trailing empty field would be important, so here's the challenge: can anyone think of a file format, or transmission format or command line syntax or whatever where the trailing field is actually required? Real world cases only please, but first two data points:
CSV files, and the Unicode character database don't require the output of trailing blanks (and parsing of the latter would certainly break if they were considered).
I have one case where it is natural to have: CSV file with a tabular data in it. When you parsing this structure, it is natural to have trailing blank, since it represents a valid data point. Another example is file path parsing. There is a fundamental difference between /folder1/folder2/file and /folder1/folder2/folder3/ Yet after spliting (and not considering the last blank) this difference is lost. Sure, it can almoust always be workarouded. But I assume, that it is much easier to skip a blank token, than check always if it was supposed to be there. Regards, Pavol.