Re: Proposed fixed version of N-Triples https://www.w3.org/TR/n-triples/ Section 7

On 07/03/2017 03:26 PM, Richard Cyganiak wrote:
> Hi Jan,
>
>> On 1 Jul 2017, at 12:49, Jan Wielemaker <J.Wielemaker@vu.nl>
>> wrote:
>>
>> It has always been in my mind that there should be white space
>> between the three elements of a triple.  I really dislike the (I
>> fear) fact that this has been abandoned.  It complicates managing
>> triple files using generic text tools significantly.  With the
>> demand to have comments on their own line and white space between
>> the three elements you can easily process n-triples files with very
>> simple tools and you can give more reliable syntax errors.  If we
>> are allowed to write
>>
>> _:a<http://example.com/p>"42" ^^ xsd:integer .
>>
>> n-triples files get IMHO less readable, harder to parse and it
>> gets harder to give sensible error messages while I see no
>> benefits.
>
> The N-Triples document defines two languages: “N-Triples” and
> “Canonical N-Triples”. The latter requires a single space between RDF
> terms and does not permit comments, and is reasonably well-suited to
> processing with line-based text tools. Producers are encouraged to
> produce Canonical N-Triples.

I know that. I only do not see why we want to make our non-canonical
triples as non-canonical as possible and as close as possible to being
ambiguous rather than enforcing current practice that makes the triples
more readable, easier to process and allows for better error messages.
I.e., where is the benefit of doing so?

I'd assume that most n-triples files are generated and most serializers
use a space to separate the three parts of the triples. Not doing so
make the serializer a lot more complicated. Other triples are
hand-written. Here it is way simpler to provide syntax support in
editors if the rules are simple. For programming languages it makes
sense to allow for a minimum of white space so we can write e.g., a =
b*c. For triples where the components are typically already very long
and there are only two spaces needed for a triple it makes very little
sense IMHO.

 Cheers --- Jan

> https://www.w3.org/TR/n-triples/#canonical-ntriples
>
> Best, Richard
>

Received on Monday, 3 July 2017 13:51:00 UTC