3 ms·
It depends on the complexity of the program/problem being solved. I think it’s conceptually simpler, for example, to demonstrate how a function that can’t have
by sidlls 3y ago
It depends on the complexity of the program/problem being solved. I think it’s conceptually simpler, for example, to demonstrate how a function that can’t have side-effects works than one that doesn’t by pure “accident”. The real trouble is when you want the program to do anything actually useful, like interact with anything (input/output). And since that’s where the vast majority of programming is spent, I tend to agree that imperative first is a better approach.