r/Clojure • • Dec 29 '21

📖 Data-Oriented Programming book: First draft

After 18 months of development, I am glad to announce that I finally completed the first draft of my book: Data-Oriented Programming.

I wanted to thank all the people from the Clojure community that helped me in the thinking and the writing process.

The book got sold decently (2.8k copies) despite being in MEAP state (Manning Early Access Program).

The book is my attempt to formulate the underlying principles of Clojure approach to data and illustrate how to apply them in another language.

Here are the 4 principles of Data-Oriented Programming:

  1. Separate code (behaviour) from data

  2. Represent data with generic data structures

  3. Data is immutable

  4. Separate data schema from data representation

For those who already bought the book or are interested, I released the book's source code to https://github.com/viebel/data-oriented-programming. The publication is expected for March 2022.

If you guys aren't sure about buying the book, contact me on Twitter @viebel, I'll DM you a preview.

91 Upvotes

22 comments sorted by

View all comments

5

u/Xarlyle0 Dec 29 '21

I've been enjoying the MEAP version for months and it gives me a great way to explain clojure principles to my coworkers and apply them in my everyday work. Congratulations!

1

u/viebel Dec 29 '21

What's the reaction of your coworkers?

6

u/Xarlyle0 Dec 30 '21

Depends on the coworker. Python developers are always impressed and surprised. Java people, both as developers and managers, are highly skeptical, especially if it's all they know. I usually need to do some work on my own for physical demonstrations, (the one in the book is helpful for this though). Javascript people like to talk a lot about it before going along with it but are usually pretty enthused. I can use React.js language to help for them. I usually credit the rise of React for the surge of functional programming in the last 5 years. It's what started my journey that finally arrived at Clojure.

1

u/SimonGray Dec 30 '21

I usually credit the rise of React for the surge of functional programming in the last 5 years.

I think you're right on the money. React is a gateway drug to functional programming.

1

u/TheLastSock Jan 11 '22

It's that because on react you work within the structure of the program (a tree) and that structure is also what your creating?