2 ms·
> We're talking about changing the interface. Who's "we"? I'm talking about changing the implementation. > Did you watch the video segment? I watched the bi
by tome 9y ago
> We're talking about changing the interface.
Who's "we"? I'm talking about changing the implementation.
> Did you watch the video segment?
I watched the bit where he said if you add a constructor to a sum type you have to change everywhere it's pattern matched. True. I'd love to see Clojure's solution where you don't have to change any existing code!
EDIT: Oh wait, I think it's even worse than that. I think he's talking about product types. In which case you should use projection functions and indeed you need to make no changes to old code!