Re: ISSUE-18: How do we parse "18." in Turtle?

On 31/03/11 22:27, Sandro Hawke wrote:
> On Wed, 2011-03-30 at 15:11 -0500, Pat Hayes wrote:
>>
>> +1  I feel Sandro's pain, but the advantages of fast greedy lexers has
>> to outweigh visual aesthetics. And in any case, I kind of like the
>> spaces, they help my mental lexer when reading.
>
> To be clear, I'm fine with greedy lexers, I just want to require at
> least one digit after the decimal point for it to be considered a
> decimal point, instead of a statement-ending period.   I believe it's a
> trivial change to the grammar and no other change to code.

Are you proposing changing SPARQL as well?  I think it's more valuable 
to keep compatibility between the two.

> Interesting that you like the spaces.  I, as a human, look for those
> digits after the decimal point.   I have to backtrack (and try to
> remember how sig figs work) when I see statements like "The item is 17.
> cm long."  But I'm fine with "The item is 17.0 cm long."

Arguing from natural language is tricky - 17.0 might be read as implying 
a precision.  Surely this is that you prefer a particular style, and 
want to require that style of everyone else?

It could invalidate existing data - I doubt it's very much (I have no 
figures either way) but it is a change to the submission grammar. 
People can always write illegible Turtle (all on one line for example). 
  I not a fan of 18. but it's currently legal Turtle, so why not leave 
it as being legal?

Maybe what is required is advice on good practice for writing data in a 
preferred style?

(and, yes, the serializers I have written do produce the 18.0 form - but 
they always put a space before the triple terminator as well.).

 Andy

Received on Friday, 1 April 2011 08:00:56 UTC