Closed phillord closed 8 months ago
Thanks for this suggestion, this is indeed a good idea. We are currently in a big refactoring of the Term
type (see for example #47 and #48), so I will probably wait until this is finished to address this issue. But I definitely will...
Thank you. Moving the IRI
type out also looks interesting. Currently I have my own IRI
type, and have also been using https://docs.rs/curie/0.1.1/curie/ which (effectively) provides a third. Perhaps there needs to be some coming together here, or a separate crate?
Closing: types in sophia_iri now implement PartialOrd.
I need to match a number of triples against patterns. But the semantics of RDF make this painful as triples are not naturally ordered. It would make life easier if I could sort the triples first so that they would come out in a predictable order.
This is easiest enough to achieve with
IriData
by simply callingto_string
and comparing these, but there is no real reason to make thatString
when we could compare the underlying data.The same would apply for
Literal
andVariable
also.