[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #5825] Variable constness
From: |
John Darrington |
Subject: |
Re: [patch #5825] Variable constness |
Date: |
Wed, 28 Mar 2007 13:54:22 +0800 |
User-agent: |
Mutt/1.5.9i |
On Wed, Mar 28, 2007 at 05:29:49AM +0000, Ben Pfaff wrote:
But I absolutely hate the idea of duplicating entire source files and
compiling them twice to have a "const" qualifier in one and not in the
other.
It's ugly to look at,
I won't attempt to argue this point.
it wastes compile time, it wastes memory at runtime,
and it even potentially wastes time at runtime due to expanded cache
footprint.
This is true. But why do these objections also not apply to
src/libpspp/deque.[ch] ? I don't see any difference, except that in
deque.* you've used a preprocessor macro to duplicate the code,
whereas I've used a perl script. The reason I chose not to use the
preprocessor, is that one cannot use other preprocessor directives
inOAside macros, and hash.c has several.
I don't totally object to using casts instead of a template, but then,
in view of deque.[ch] we're not being entirely consistent.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature