|
|
|
|
|
by mabbo
2495 days ago
|
|
Oh, we also own plenty of those in Java. That's the job- carefully lay the legacy to rest as you replace it with something better. But at least the Java is overly verbose. It takes a while to read all that code. With the clojure stuff, I'm staring at the same line for just as long and getting no where. |
|
For example if I see something like (filter even? numbers) I immediately know what is being done and why. There aren't any surprises there.
Meanwhile, when I see something like:
then I have to walk through that code in my head to figure out what the intent is, and whether it's actually doing what it's meant to. On top of it I have to worry about mutability. Should a new variable like acc be used, or should the numbers list be updated in place, if it is updated in place where are all the other places that it's used, and are they being affected when I make a change, and so on.So, there's a lot more to think about even in a completely trivial case such as the example here. In real world code that complexity quickly becomes overwhelming in my experience.