clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
2020-08-18T11:57:47.165100Z

@apbleonard: I’ve noted this similarity before too, but I think the similarity comes more from the property oriented starting point inherent in RDF and spec. i.e. spec and SHACL are similar because they both come from the same starting point, that properties/keywords are first class and more important primitives than the entities on which they exist. @alexmiller As I understand it SHACL is also open by default; though you can close shapes with sh:closed true. It’s true though that I think one of the big usecases for SHACL is in being able to close the world; in particular setting the min/max cardinality of a shape to 1, though I think the excitement around SHACL is more that it helps a long-standing area of frustration in RDF, which is that in RDF essentially every property/join can be many->many. Which has historically made it somewhat harder to validate and build user interfaces against it. In this regard datomic/clojure is I think arguably less open-world, but more pragmatic, in that it closes the world on some properties by allowing essentially cardinality of 1. Sure, OWL does let you sort of do this; by falling back on the non-unique-names assumption, but relying on reasoning everywhere can be impractical.

👍 1