I think your post mostly re-enforces the OP's claim that FP won't save the day. To quote the OP, "it is obvious to me that doing FP right is (and will be) very hard."
In-so-far as your claims are true and germane to FP, they merely re-enforce this critique. After all, doing math right is very hard.
> and we have no sound way of modeling imperative languages/programs in ways that makes them useful as mathematical concepts.
This simply isn't true. There exist sound logics of imperative programs, which can be used to explore mathematical concepts.
This also pre-supposes that imperative programs themselves (and machine models more generally) are not an interesting mathematical concept.
> FP is math
It's entirely unclear what this means, if anything. You probably mean to say that certain functional languages correspond to certain logics. But that's not terribly meaningful; you can establish similar correspondences with imperative languages.
And even then, logic is math does not imply that math is (just) logic. So even if you're granted this point, the rest of your argument doesn't follow.
From a more empirical perspective, plenty of mathematicians do great math without knowing anything about FP, and plenty of FP programmers write a ton of code without ever doing interesting math.
Finally, the vast majority of very mathematically informed programming is still done in languages like C and Python and Java. So I'm highly suspicious of the claim that we need programming languages which are close to foundations in order to do mathematically informed programming.
In-so-far as your claims are true and germane to FP, they merely re-enforce this critique. After all, doing math right is very hard.
> and we have no sound way of modeling imperative languages/programs in ways that makes them useful as mathematical concepts.
This simply isn't true. There exist sound logics of imperative programs, which can be used to explore mathematical concepts.
This also pre-supposes that imperative programs themselves (and machine models more generally) are not an interesting mathematical concept.
> FP is math
It's entirely unclear what this means, if anything. You probably mean to say that certain functional languages correspond to certain logics. But that's not terribly meaningful; you can establish similar correspondences with imperative languages.
And even then, logic is math does not imply that math is (just) logic. So even if you're granted this point, the rest of your argument doesn't follow.
From a more empirical perspective, plenty of mathematicians do great math without knowing anything about FP, and plenty of FP programmers write a ton of code without ever doing interesting math.
Finally, the vast majority of very mathematically informed programming is still done in languages like C and Python and Java. So I'm highly suspicious of the claim that we need programming languages which are close to foundations in order to do mathematically informed programming.