Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-09-14 11:20:35


----- Original Message -----
From: "John Maddock" <John_Maddock_at_[hidden]>

> >First, a remark on the code: it's full of long functions with many levels
> of
> >nesting and many switch statements. I recognize that regular language
> >interpreters are a special breed, but this reminds me of the bad-old-days
> of
> >'C' programming, before I learned to break things down into digestible
> >pieces. I find the "big monolithic function" style of programming leads
to
> >maintainance and readability problems. Does it have to be this way?
>
> Maybe :-)
>
> Whenever I get a chance I try and refactor that section, but the regex
> syntax is so convoluted that its not easy to do without passing tons of
> parameters down the stack.

What I usually do in that case is to make the function into an object, where
some of the state goes into data members. Can't say how that affects your
efficiency, of course.

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk