Subject RE: [IB-Architect] Libraries and C++
Author Jim Starkey
At 08:26 PM 10/13/2002 -0700, David Schnepper wrote:
>
>In particular, what bugged me about the STL was I never
>could understand when it would choose to alloc/free memory.
>Since this was vital to my application, AND I couldn't
>get a version of STL to work in all of the 3 environments I
>cared about, I took a pass on everything in it.
>

Perhaps my opinions have already been represented by a third
party. But I found that MFC was unavoidable on Windows and
quite incompatible with STL (or maybe I lacked the ambition
to force two things that were natural enemies to co-exist).

I use MFC for Windows GUIs. For everything else I use the
C RTL for the OS interface, platform specific includes where
I just, any my own code for everything else.

The only class that ever tempted me were the string classes.
So I made my very own string class (called JString -- am
I an ego-centric or what?) and I have been very, very happy.
The whole effort took hours and hours, and I had something
that was portable and did exactly what I wanted.

That said, a database shouldn't be using string classes, ever.
The compile side should be using symbols (pointer to canonical
strings that can be compared as pointers) while the runtime
side of things should use memory allocated during compilation
instantiation. A database can't afford to allocate dynamic
memory to reference a data value...

I hate C++ templates with a passion. Part of the hatred was having
implemented them once is a schema driver C++ persistence product
(Object Cold Storage). If I woke up one morning and discovered
I have designed C++ templates, I would change my name, move,
and find a new line of work. Just one geek's opinion, of course.

I also consider the C++ std I/O modules to be childishly stupid.
If they'd been turned in by an undergraduate taking computers-for-
poets, I'd give him or a her a good grade. But a CS student
would be a counselling session urging a change in majors.

The brilliance of Java is not garbage collection or safe typing,
but defining (and sticking to) a minimalist subset of C++. And,
with the exception of Object and Class (and a lessor degree String),
a pure runtime-less language.

Remember, no captain who writes Java code using a C++ compiler can
go far wrong.

Jim Starkey