It looks like you started with some important points, and then let them lead you to the most unproductive possible conclusion.
> The more bugs in the system, the shorter you can think ahead.
Very true. Too many bugs prevent me from thinking ahead, forcing me to program very slowly by trial-and-error.
> If you have to work with some buggy system over which you have little or no control, which is often the case, you are limited in how much you can think ahead.
There are many buggy systems over which I have little or no control. I often, however, can decide not to work with such systems in the first place. Since such buggy systems have so much effect on my productivity, it is worth putting a lot of effort into avoiding them.
> This may be why so many Haskell examples are math-centric: it allows you to look the farthest into the distance.
It may also explain why Haskell has so much built-in error checking, why Haskell programmers have been pioneers with respect to new testing strategies (Quickcheck), and why Haskell programmers try to separate `pure` and `impure` code so that as much of their program as possible can be math-centric. They are trying to spend as little time as possible with buggy code that slows them down.
> That's no doubt true, but that can only get you so far
Thinking ahead is great only under ideal conditions, as you pointed out. If you accept whatever conditions are there, thinking ahead can only get you so far. Taking responsibility for such conditions, and trying to change them, can get you much farther.
--------------
I actually don't use Haskell very much, but Clojure has a lot of similarities. Like Haskell, Clojure has a lot of support for abstraction and allows you to do a lot with very little code. Perhaps even more importantly, Clojure libraries tend to be simpler, easier to understand, and less buggy than their Java counterparts.
> The more bugs in the system, the shorter you can think ahead.
Very true. Too many bugs prevent me from thinking ahead, forcing me to program very slowly by trial-and-error.
> If you have to work with some buggy system over which you have little or no control, which is often the case, you are limited in how much you can think ahead.
There are many buggy systems over which I have little or no control. I often, however, can decide not to work with such systems in the first place. Since such buggy systems have so much effect on my productivity, it is worth putting a lot of effort into avoiding them.
> This may be why so many Haskell examples are math-centric: it allows you to look the farthest into the distance.
It may also explain why Haskell has so much built-in error checking, why Haskell programmers have been pioneers with respect to new testing strategies (Quickcheck), and why Haskell programmers try to separate `pure` and `impure` code so that as much of their program as possible can be math-centric. They are trying to spend as little time as possible with buggy code that slows them down.
> That's no doubt true, but that can only get you so far
Thinking ahead is great only under ideal conditions, as you pointed out. If you accept whatever conditions are there, thinking ahead can only get you so far. Taking responsibility for such conditions, and trying to change them, can get you much farther.
--------------
I actually don't use Haskell very much, but Clojure has a lot of similarities. Like Haskell, Clojure has a lot of support for abstraction and allows you to do a lot with very little code. Perhaps even more importantly, Clojure libraries tend to be simpler, easier to understand, and less buggy than their Java counterparts.