Subject RE: [IB-Architect] Rock>Java>Threads>Hardplace
Author David Berg
re:

> I think the order of battle would be this:
>
> 1. Change all engine .c files to .cpp files
> 2. Clean up the million warnings
> 3. Upgrade (i.e. replace) current exception handling
> 4. Gradually convert major subsystems to objects.
>
> I suspect that the first three phases would take under a week.
> A little experimentation will suffice.

Having been involved in doing just this to the Paradox DOS and Paradox
Windows code bases, I suspect you are underestimating. However, I grant
that you know the Firebird code base much better than I do.

The biggest thing is that each warning does have to be looked at
individually. Lack of prototypes will kill you since they're not optional
in C++ like they are in C (when warnings get promoted to errors, it sort of
ruins your day).

There's a way to tell C++ to process code using the C parser/compiler, but I
can't quite remember what it was. I do remember a lot of our conversion
efforts required wrapping existing code with whatever function it was,
something like:

#COMPILE "C" {
<old code>
} // End of C code

Like I said, this isn't right. I can see the right code in my head, but I
just can't remember exactly how to write it (it's been about 5 years since I
last had to do this).

However, even doing just this allowed us to intermix C and C++ code, and
that was well worth the hassle.

Dave Berg