![Functional Design in Clojure artwork](https://is5-ssl.mzstatic.com/image/thumb/Podcasts113/v4/93/a5/2e/93a52ec2-151e-b60a-25e8-868e74977546/mza_4040180217548433975.png/100x100bb.jpg)
Ep 045: Why Have Derived Fields in Data When I Can Just Calculate Derived Data as Needed With a Function?
Functional Design in Clojure
English - September 06, 2019 15:00 - 20 minutes - 28.9 MB - ★★★★★ - 17 ratingsTechnology Education How To tech software design functional clojure immutable geek nerd development nate Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed
We take a focused look at the balance of using functions or derived fields and where each is preferable.
Each week, we answer a different question about Clojure and functional programming.
If you have a question you'd like us to discuss, tweet @clojuredesign, send an email to [email protected], or join the #clojuredesign-podcast channel on the Clojurians Slack.
This week, the question is: "Why have derived fields in data when I can just calculate derived data as needed with a function?" We take a focused look at the balance of using functions or derived fields and where each is preferable.
Selected quotes:
"Clojure has a gravity toward using the built-in data structures."
"Immutability helps you handle concurrent updates to dependent fields without using locks."
"If you add derived fields, you can query the data using information at different levels of abstraction."