3 ms·
I don't recognize the problem from this article (programming for 20 years, including 10 doing R&D as a consultant). Firstly I don't spend most of my time debug
by sago 12y ago
I don't recognize the problem from this article (programming for 20 years, including 10 doing R&D as a consultant).
Firstly I don't spend most of my time debugging. I do spend a fair amount of time programming in a way that makes it less likely I'll have to debug (asserting contracts, implementing tests). Whacking out some random spaghetti code, then spending days navigating it isn't productive.
And secondly, thinking about the recent projects I've worked on, the debugging I have done has not been about finding where a variable got the wrong value. The only day-sapping bugs I've had recently have been figuring out why some piece of code performs an incorrect calculation; and figuring out how to ensure the correct order of different operations. The latter I suspect would have been more difficult in an FP with a more complex stack trace and tail call elimination. Most of the smaller debugging problems I have relate to impedance mismatches between my code and 3rd party libraries.
Library interface problems seem less in FP, but mostly because there are fewer libraries. It is easy to make a totally understandable, simple, programming environment if you never have to do any heavy lifting with other people's code.
I program in FP, but a lot of the time I end up in OO languages with good library, tool, testing and debugging support.
I can't help but think this is another case of FP-zealots interpreting the world in a way that maximises the problem they know how to solve.