Re: refcounted buffers / squid-3

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 11 Jul 2001 20:19:55 +0200

Alex Rousskov wrote:

> IMO, the reasons to use a better language are exactly the same as the
> reasons for redesign: one should do it when it becomes prohibitively
> expensive emulating better language features using the old code. I do
> not know if Squid reached that stage, but we are definitely emulating
> a lot of C++/OO concepts in Squid.

We are. However, as of yet the syntactic sugar is not a main reason.

Most of the arcane OO hacks in Squid is hidded in the upper layers,
implemented once and then noone have to care about them.

One reason to switch to C++ is inheritance and templates, allowing
common functions like cbdata, mempools or reference counts to be
implemented more transparently. However, cbdata and refcounts would
still require some sugar to make sense in reference management, even in
C++.

The other is to get a OO syntax people are used to, making it easier for
new people to grok the concepts.

> The drawbacks of using a better language are exactly the same as the
> reasons for avoiding redesign: big changes make most humans
> uncomfortable and might kill the project before the benefits of
> redesign are realized.

There is one additional drawback in that switching language may require
more of the code to be rewritten than intended. However, in a switch
C->C++ probably not that much more than what have to be rewritten even
if we stay in C..

> Again, I do not know if C++ is better "enough" to warrant itsuse,
> given current Squid developers background and preferences.

We'll take a vote when stage 1 is finished and stage 2 beginning to take
shape. Before that there is not much of a point in defining choice of
language as the parameters for the rewrite is not set yet.

--
Henrik
Received on Wed Jul 11 2001 - 12:19:53 MDT

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