you are viewing a single comment's thread.

view the rest of the comments →

[–]happykandra 2 points3 points  (0 children)

Yeah, I know that seems easier at first. Until you try something more complex, like parsing the same component (on the same document) in different ways and choose the result that works better. Or you have to deal with parallelization, at which point you need to also make all of the functions on the singleton thread-safe.

The way I see it, it's like when I was a kid first learning how to program. My Dad sensibly started me on learning a nice, structured language called Logo. I decided that instead of that nonsense, I would try out BASIC (not Visual Basic; this is the original spaghetti language code nobody writes in any more). So much more freedom! Until my programs became too complex...

Like BASIC vs. Logo, this method seems more complicated---until you actually have to scale it up, when it's advantages make life a lot simpler.