Re: static_cast in squid3

From: Robert Collins <robertc@dont-contact.us>
Date: 09 Nov 2002 12:47:48 +1100

On Sat, 2002-11-09 at 12:36, Evgeny Kotsuba wrote:
> Hi,

> I have a problems: VAC4.0 is too deep crazy object oriented for me. By
> the way it is to VAC4 complexity that Sun could not make StarOffice
> for OS/2.

Do you mean the VAC class libraries, or the operation of the compiler?
As we are simply using network and file API's, we shouldn't run into
application framework complexity issues.

> >> The last stable version of EMX (GNU compiler and utils) for OS/2
> >> contain GCC 2.8.1
> >
> >What about
> >http://www.goof.com/pcg/os2/index.html
> >?
> >
> >It looks like the ecgs fork and merge dropped most OS/2 support from
> >gcc
> >mainline. So, compatability with some version of VAC is important for
> >OS/2.
> I don't understand well what you are saying about. If about fork -
> then it is not system supported and is emulated in emx and work a bit
> worse than that in unix.

The gcc project split into two (a fork) some time ago. The split version
was called egcs and added significant c++ support. The original version
was removed and egcs renamed to gcc once egcs was stable. IIRC this
happened at version 2.95.0

> >
> >But, I'd tend to use a sorted container if I needed regular access to
> >sorted data. Containers are good, arrays are evil.
>
> Defenetly you should read about Occam blade philosophy.
> I think it can be possible to use normal qsort and two C-style type
> cast

Grin. I think you mean Occam's razor? I can show you examples using a
normal qsort and two C-style casts that will *fail*. C-style casts are
not safe.

You have three forms of generic programming in c++:
templates (generic programming)
dynamic class hierarchy ('Is-A')
C casts

templates are the most type-safe. inheritance is less so, and C casts
least typesafe.

By the way, does the refcount test program work for you?

Rob

Received on Fri Nov 08 2002 - 18:47:52 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:18:39 MST