Chris:
Every time I write something in JS, I feel like a complete programming novice,
Probably that's part of the problem. More experience in a language helps.
I suggest to use TypeScript (http://www.typescriptlang.org/ ), it has static types, more Java-style classes, better modules, and more; that give a more tidy and ordered kind of coding. If JavaScript gains integers too, programming in TypeScript probably becomes bearable even for die hard D programmers :-)
Bye, bearophile
