Re: Woo hoo ... a whole new set of compiler headaches!! :)

From: "Dave Held" <dave(dot)held(at)arrayservicesgrp(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Woo hoo ... a whole new set of compiler headaches!! :)
Date: 2005-04-22 18:47:22
Message-ID: 49E94D0CFCD4DB43AFBA928DDD20C8F9026184D1@asg002.asg.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Friday, April 22, 2005 1:22 PM
> To: Dave Held
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Woo hoo ... a whole new set of compiler
> headaches!! :)
>
> [...]
> And not much reward, either. To actually get benefit commensurate
> with the risks involved,

Then we are certainly measuring risk differently, because my
assessment is that it would not need to offer anything more than
very modest benefits to justify the risk. It's not like rewriting
the codebase in Java. It's not even close.

> we'd need to do some wholesale revisions of internal APIs and
> coding practices.

No you wouldn't. You could make incremental revisions that offer a
very gentle learning curve to C++. My suggestion is to convert the
codebase iteratively, taking only small sure steps at each iteration.
The internal APIs would evolve, not be overturned and replaced. And
the coding practices encouraged by C++ generally lead to safer and
more readable code, but would still not prevent people from writing
idiomatic C within C++ if they really wanted/needed to (except where
features have been converted to C++, of course).

> It might not qualify as a complete rewrite, but it'd be dang close.

It would only be a complete rewrite if you wanted to take it that
far. Otherwise, it would be many small modifications each of which
can offer an independent dimension of benefit that can be weighed and
judged on its own.

> Personally I think the costs would far exceed the benefits.

The costs would be fairly minor, as most of the developers would not
necessarily be responsible for converting the codebase, only following
the new rules as they are introduced over time (and even then, many
of the rules could be ignored anyway, like using C++ casts instead of
C casts, or using constants instead of macros). Only the people who
are comfortable and proficient with C++ would need to invest the time
to make sure that upgrades to the codebase proceed in an orderly manner.

__
David B. Held
Software Engineer/Array Services Group
200 14th Ave. East, Sartell, MN 56377
320.534.3637 320.253.7800 800.752.8129

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-04-22 18:52:51 Re: Bad n_distinct estimation; hacks suggested?
Previous Message Dave Held 2005-04-22 18:39:15 Re: Woo hoo ... a whole new set of compiler headaches!!