News for hackers. Stuff that matters.
Re:Clojure at Netflix (2013) [slides] by tanin on Wednesday October 31, 2018 @02:03PM (#18347938)
> It does depend on how you write your code but favoring pure functions, pushing immutability to the edges of your programs allows you to refactor without fear.

Dynamic typing is punitive if we make mistake (e.g. using the wrong architecture, now we have to refactor), and we'll make mistakes.

Writing perfect code with perfect architecture and perfect test has been the argument "for" dynamic typing, but I don't think that's a realistic assumption.

Re:Clojure at Netflix (2013) [slides] by yogthos on Wednesday October 31, 2018 @08:11PM (#18350368)
My experience is that static typing tends to lead to higher coupling and monolithic design, while you tend to break things up more aggressively in a dynamic language like Clojure.
Re:Clojure at Netflix (2013) [slides] by tanin on Thursday November 01, 2018 @02:48PM (#18357135)
I understand what you mean, and it's definitely a trade off.

Static typing requires all types to make sense together no matter how small the addition is.

In dynamic typing, we can just add a class/object/field here and there because it'll only be used narrowly anyway. So, it's often fine.

This would be great if we can think of a small example to illustrate this trade off.

Re:Clojure at Netflix (2013) [slides] by yogthos on Thursday November 01, 2018 @03:39PM (#18357657)
One example I can think of is how Ring middleware works. The request map is passed through a series of functions, and each one can modify it in its own way. For example, you could have an authentication library that adds an :identity key, and another that adds a :session key. These libraries can work together without having to know anything about each other.