architecture

2017-12-11T15:40:14.000692Z

I feel like I have no position to argue this, but I felt clojure applied had to much of an emphasis on records, in creating new types. The first couple chapters end up modeling almost everything with records and if i recall, the justifications were all performance based. I feel specs fill the role of modeling (communicating or restricting) the domain better, which would leave records purpose as a means of polymorphism (and i suppose performance enhancers). I’m happy to hear differing opinions

2017-12-11T15:41:31.000013Z

I need to find the time to work through a larger clojure project and see how things come together though.

2017-12-11T15:54:35.000214Z

I feel modeling a system in Clojure is straight forward. It almost makes it harder to get things done because you can find yourself imagining more and more ways to solve the problem and its actually possible to do them (or to bounce between them). It can be very distracting…

imetallica 2017-12-11T16:17:41.000480Z

@drewverlee well, afaik spec is a recent thing, the book is from 2015.

imetallica 2017-12-11T16:19:48.000542Z

I find value in Recods when you need to have polymorphism based on fixed structure, such as "financial transactions data", and spec as a means to validate what can go inside my fields. But, I'm a clojure newbie, so there might be an obscure way of doing it.

imetallica 2017-12-11T16:21:07.000392Z

Comming from Elixir, which has a similar thing as Protocols, which dispatch on "type" (a struct, since Erlang have no strong types), that's where I find value, at least.

2017-12-11T16:34:24.000373Z

Your right the book came before. I’m not sure that how that would have changed things. I agree with your assessment. I felt that the authors reached for records almost immediately, without a strong use case. The book “Clojure polymorphism” Goes into this topic at depth, its a book that requires a couple reads and explores a lot of subtle tradeoffs.

imetallica 2017-12-11T17:49:27.000676Z

@drewverlee this book? https://leanpub.com/clojurepolymorphism/

2017-12-11T18:07:46.000463Z

@imetallica yep! 🙂.

👍 1
imetallica 2017-12-11T18:10:31.000390Z

Gonna take a look. 🙂