Skip to content

Are @subject and @iri redundant? #15

Closed
@lanthaler

Description

@lanthaler

In the spec, @subject is used to denote the subject of an item, and @iri is used to denote a value which is an IRI. However, from chaining, the distinction seems to go away. For example, consider the following two graphs:

{
  "@subject": "http://greggkellogg.net/foaf#me",
  "foaf:homepage":
  {
    "@iri": "http://greggkellogg.net/"
  }
}

and

{
  "@subject": "http://greggkellogg.net/foaf#me",
  "foaf:homepage":
  {
      "@subject": "http://greggkellogg.net/"
  }
}

From step 2.6.1 in the spec, the first use of "@subject" ("@" in that version) generates a triple in the same way that step 2.2, for "@iri", does.

We could simplify the spec by either removing "@iri", or replacing "@subject" with "@iri". Of course, using the aliasing mechanism we've discussed, the other could continue to exist as semantic sugar in the default context.

So, @subject works the same as @iri when given in an object of a property, so @iri could be considered redundant
(albeit more understandable at least for @Coerce). The question would be if @iri is sugar for objects with only that key (an no other properties), or if it works just like @subject.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions