Predicate-lists (;) and object-lists (,)

Stop repeating yourself.

0/3 done

Theory

Two compactness shortcuts:

  • ; — same subject, new predicate.
  • , — same subject and predicate, new object.
:Alice a foaf:Person ;
       foaf:name "Alice" ;
       :knows :Bob, :Carol .

How much typing you save — same four facts, two ways:

# Verbose: 4 lines, :Alice repeated 4 times.
:Alice a foaf:Person .
:Alice foaf:name "Alice" .
:Alice :knows :Bob .
:Alice :knows :Carol .

Both forms parse to the exact same four triples — the shortcuts are pure syntactic sugar over the long form above.

Reading in progress · 0 of 3 activities done