3 ms·
I've honestly never felt like types have gotten in the way. I also write plenty of tests with plenty of mocking, it's just that the type system means we don't h
by tunesmith 11y ago
I've honestly never felt like types have gotten in the way. I also write plenty of tests with plenty of mocking, it's just that the type system means we don't have to write tests for the things the type checker checks for.
I'm having trouble thinking of a time when I felt something akin to what you describe with zombie constraints. If anything, having a good type system makes it easier to rip out code that isn't used anymore. And Generics can help with keeping your solution from getting too specific.
- bcbrown 11y agoI've run into a case where we model an ID as a number, then added a partner that uses alphanumeric IDs. But I'm still pro-types, and think they solve way more problems than they cause.
- abc_lisper 11y agoThe only dynamic language I used in production code is Clojure, hence my perspective is probably skewed by it. > I'm having trouble thinking of a time when I felt something akin to what you describe with zombie constraints Think of deprecated methods in a class, unneeded methods in an interface that are stubbed etc. > I also write plenty of tests with plenty of mocking This is good. But what happens to mock objects when the underlying class changes its implementation - It needs a large number of changes in tests. If you are writing micro-services, the guarantees that typed system gives you are more trouble than they are worth. If your average microservice is less than 10k lines of code, it probably reduces to 1000 lines of code in Clojure, and for the codebase of that size, typed systems provide little value for the cost(atleast for me).