[fitsbits] reopening of Public Comment Period on the CONTINUE convention

Demitri Muna demitri.muna at gmail.com
Tue Mar 8 16:25:01 EST 2016


Hi,

On Mar 3, 2016, at 4:04 PM, William Pence <William.Pence at nasa.gov> wrote:

>> - Shouldn’t the ampersand be located outside of the quoted string?
> 
> No.   There is no ambiguity by requiring the ampersand to be the last character of the quoted string.  It would be more ambiguous to say the ampersand must be the first character of the comment field.  In that case, should it precede or follow the recommended space following the slash character?  Should it precede or follow any optional units string in square brackets?  Also, from a practical standpoint it is more convenient parse the ampersand as part of the value string rather than having to parse the comment string as well.

There is a standard here that is used in virtually every (every) computer language - continuation or concatenation characters are located outside of the string being quoted. This also subverts the literal meaning of the quotes. Quotes specifically delineate the content. The ampersand inside the quotes will unquestionably be interpreted as a value in the string. This isn’t a question about parsing convenience (which isn’t difficult here) but rather nearly globally accepted usage.

If the motivation is to turn into a standard something that someone else decided ad hoc to do, then I’d ask if this really is the best way to define standards? The fact that one institute did something doesn’t necessarily make it the best idea, and in this case I really don’t think it is.

>> - Is there a benefit to a free form text field having a comment? Particularly as it might contain an unlimited number of lines?
> 
> Some users might find it beneficial to continue the comment field, as well as the string value itself, over the same keyword records.

The point of this proposal is to allow essentially unlimited, free form text in the header. If someone has that much to say as a comment, it seems like it should be contained in the string. What would user interfaces look like for this? Not allowing continuation of comments limits the number of characters to roughly 70 characters. I just don’t see the benefit of it being an unlimited field when the continuation character is explicitly creating just that.

>> - I think that if a line ends with an ampersand but the next does not contain the “CONTINUE” keyword, is should be an error. If it looks like an error (even acknowledged in the document), it should be an error.
> 
> It is an error in the sense that the keywords probably do not convey the meaning that was intended, however all the individual keywords completely conform to the requirements for  valid FITS keywords and are perfectly legal.  Also, it is possible for a string keyword to actually have an ampersand as the last character of the string.

Another reason to keep the continuation character outside of the string. And in the event that an ampersand is the last character of a string, it should be escaped (again, this is standard). While having a trailing ampersand is strictly legal we should not open the door to ambiguity, although that legality is exactly what is under discussion and I am arguing against.

>> - There should be no chance (particularly through an error!) that the continuation string (“&”) be assumed to be part of the long string. This is another argument to keep the continuation character outside of the quoted string.
> 
> As mentioned above, putting the continuation character inside the quoted string is better than the alternative.  In any case, in the 22 years that this continuation convention has been used by the HEASARC (and many others) in countless FITS files, we have never (to my knowledge) encountered any problems with the long string values becoming corrupted.

The lifetime of the FITS standard is very likely to last longer than that again. Limitations/mistakes of the past should not dictate decisions for the future, specifically when defining a standard. However much software has been written in the past, more is yet to be written.

Cheers,
Demitri

_________________________________________
Demitri Muna
http://muna.com

Department of Astronomy
An Ohio State University

My Projects:
http://nightlightapp.io
http://trillianverse.org
http://scicoder.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20160308/06b00e54/attachment.html>


More information about the fitsbits mailing list