As for my reply above: "you should not have that problems" does not make them go away: some problems solved by software are inherently complicated and cannot be reduced to some simple API calls or a 5kloc code base. Composition of 100 multiple 5-kloc code bases still makes them a 500-kloc code base with all mutual dependencies.
Just saying "you should not write so much code" might display inexperience with problems which fall outside of the currently common javascript apps ...
The worst is even that you (or somebody else) begins with good intentions ... and then , 4 software generations and law changes later, the complexity starts to smell.
Heijlsberg argues, that javascript will be harder to refactor in those cases. I can't really disagree with him.
So it find it's not so much lacking thought. The current thought for some is "let's use javascript", let's see what comes of that... :-)
We haven't really figured out how to write large complicated applications- Static analysis is no magic bullet, and neither are dynamic languages. I think what we are seeing is just a kind of physics of the mind- reactions and re-reactions to unpleasant experiences we've all had, and are trying to avoid, which leads us to polarise on the static/dynamic divide.