Re: RDF API updates

Shane McCarron wrote:
> On 4/24/2011 8:42 AM, Nathan wrote:
>> Also, just what do we do about literals people are creating? for example:
>>
>>   createLiteral(100, "xsd:double");
>>   createLiteral(10*10, "xsd:double");
>>   createLiteral(1e2, "xsd:double");
>>   createLiteral(+1e2, "xsd:double");
>>   createLiteral(+100, "xsd:double");
>>
>> All of those values are of the type (number) in javascript and have 
>> the same value "100" with no access to the original form.
> 
> To my mind all those are the same.  There is nothing we *can* do.  If 
> you want to put in a note to that effect, it might be reasonable.

Yes they are all the same, so I guess I'm saying that it feels a little 
strange to have:

   createLiteral(100, "xsd:double").equals( createLiteral(+1e2, 
"xsd:double") ) === TRUE

whilst if the original source was say turtle, then they would not be 
considered equal, seems like unexpected functionality to me.

Back to reality, just what do we write in the RDF API specification?

- keep it as is, which appears to work, afaict - compare value if you 
know the datatype, else compare lexical form

- change to read something like "equality is defined by RDF <link> here"

- something else?

Best,

Nathan

Received on Sunday, 24 April 2011 17:35:20 UTC