This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-29
Channels
- # announcements (3)
- # babashka (47)
- # beginners (88)
- # calva (17)
- # clj-kondo (8)
- # cljdoc (1)
- # clojars (9)
- # clojure (98)
- # clojure-europe (53)
- # clojure-norway (2)
- # clojure-seattle (1)
- # clojure-uk (5)
- # clojurescript (20)
- # cursive (11)
- # data-oriented-programming (1)
- # data-science (3)
- # datahike (1)
- # datascript (3)
- # events (3)
- # graalvm (5)
- # honeysql (7)
- # hyperfiddle (1)
- # jobs-discuss (10)
- # leiningen (3)
- # malli (16)
- # music (4)
- # nbb (17)
- # off-topic (45)
- # pathom (9)
- # portal (7)
- # releases (1)
- # shadow-cljs (80)
- # sql (15)
- # tools-build (5)
- # xtdb (23)
Btw, I asked this question on reddit and Eric Normand answered it, despite it being poorly formulated. "I think I might get what you mean: the problems with deeply nested data structures. I tend not to use deeply nested types. I don't like that people hard code paths to reach down into a nested data structure. It cements the data structures and forces you to understand more than you can hold in your head. I have a talk on this problem and my suggested approaches: https://ericnormand.me/speaking/you-are-in-a-maze-of-deeply-nested-maps-all-alike-talk Basically: Normalize by using indexes by id. Refer to entities by id, don't nest them in you data structure. (You can do it within very local scopes, not within modules.) Don't use long paths. Start to define operations for your entities, don't reach in and change things using long paths." "When I do DOP (which is all the time in Clojure), the data only lives for the briefest time. It usually comes from a database (normalized there) and serves a specific need. If I do need to store de-normalized data, I make sure it is clear it is not a source of truth. There is one source of truth (usually the DB), but sometimes I need to make a local cache or index of the data. However, that can be reset and rebuilt at any time."