Re: Type Coercion is confusing (ISSUE-34)

In fact, my internal representation is what you suggest. The rationale for the existing rep is that it is much shorter, otherwise a given type would need to be specified once for each property.

Gregg Kellogg

Sent from my iPad

On Sep 28, 2011, at 6:12 AM, "Markus Lanthaler" <markus.lanthaler@gmx.net> wrote:

> 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 15:26:48 UTC