Type Coercion is confusing (ISSUE-34)

OK.. last but not least I would like to discuss the type coercion feature
which I find a bit confusing.

The reason is that it works the other way round as it is normally expected
by developers/programmers. An exemplary type coercion definition looks as
follows:

"@coerce":
{
  "xsd:integer": "age",
  "@iri": "homepage"
}


Which says that age is an integer and homepage is an IRI. I expect that an
average developer would try to specify it exactly the other way round:

"@coerce":
{
  "age": "xsd:integer",
  "homepage": "@iri"
}


What was the rationale of doing it the other way round? Isn't it even in the
processing algorithms more handy if it is stored in the second form?


--
Markus Lanthaler
@markuslanthaler


 

Received on Wednesday, 28 September 2011 13:11:56 UTC