This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-30
Channels
- # 100-days-of-code (2)
- # announcements (2)
- # beginners (8)
- # boot (6)
- # calva (52)
- # cider (6)
- # cljs-dev (11)
- # cljsrn (3)
- # clojure (58)
- # clojure-austin (2)
- # clojure-russia (6)
- # clojure-spec (23)
- # clojure-uk (12)
- # clojurescript (29)
- # datomic (10)
- # emacs (1)
- # figwheel (2)
- # figwheel-main (2)
- # fulcro (3)
- # luminus (1)
- # off-topic (38)
- # re-frame (21)
- # ring-swagger (1)
- # robots (1)
- # shadow-cljs (65)
- # spacemacs (3)
- # tools-deps (16)
I wouldn’t call it duck typing, per se. Those attributes have type and they’re part of the datomic schema and mean something. I.e., a datomic attribute should only have one semantic meaning. Practically though, no, it’s worked quite well for me. :) W.r.t. the entities possibly being of multiple entity “types”, it’s set membership / set semantics for typing.
we've found the same thing: instead of thinking in terms of types think in terms of qualities of things -- everything is a composite of multiple qualities
still, it's convenient to have a :kind attribute for some things
@solussd oh; what I meant is that, with this approach, it seems to me quite hard to ensure that specific attributes are present on certain entities. i.e. that a “first name” and “last name” is provided for an entity that acts as a “person”, etc
@hmaurer ah, I suggest using transaction functions as entity constructors. That’s the idiomatic way of ensuring a particular shape for a particular kind of entity in datomic.