Re: Static typing in Python
> Do you mean “I don’t want to decide whether this is float or needs higher precision”?
Perhaps I could have been clearer - I speak as a research scientist (see also my reply above to EarthDog). At the research stage, precision considerations and the pitfalls of numerical computation are premature - while indeed crucial, that happens later down the line, once you understand the nature of the computation required.
> Or, is the argument “I need to hack code fast, because I don’t have a pre-defined idea of what I’m building, I’m just trying some model ideas. So, I really don’t have time with this types crap”
Yes, pretty much that.
> Unless you have actually done your numerical analysis and stability correctly, those “trial models” are basically outputting crap anyway. You can’t use them as intuition pumps ...
I respectfully disagree. Speaking from experience, those trial models will not in general be crap. But of course trial models are just that - trials - and there is no excuse whatsoever for not performing due diligence prior to publication and software release. Believe me, if every scientist spent half (no, make that three quarters) of their time performing a watertight numerical stability and precision analysis on every interim stage of a complex, iterative process of trialling a range of approaches and explorations of parameter spaces, no science would get done. That's the scientific equivalent of the dreaded premature optimisation.
> We saw this exactly with all the Covid social modelling out of Imperial, remember?
Did we, though? Were the failures of those analyses actually down to numerical stability/precision issues? Correct me if I'm wrong, but my impression was it was more a matter of ill-thought out and speculative assumptions, coupled with poor-quality input data and over-reliance on the veracity and accuracy of prior evidence. I.e., bad modelling, bad programming, bad science - but hardly a numerical computation failure per se.
> The argument for quick hack prototypes in science is very, very weak.
As a working research scientist, again I respectfully disagree - but I'll re-emphasise the importance of due diligence.