pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #5825] Variable constness


From: Ben Pfaff
Subject: Re: [patch #5825] Variable constness
Date: Tue, 27 Mar 2007 23:18:15 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> 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
> in.OAside 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.

deque.[ch] is ugly too.  It's simply the approach that occurred
to me at the time.  I'll gladly delete deque.[ch] from the
repository and make its clients do it another way.  Perhaps
there's even a better way to do it.  Give me a couple of days and
I'll come up with something.
-- 
RMS on DRM: "This ought to be a crime. And, if we had governments of the
people, by the people, for the people, then the executives of those companies
would be in prison.  But they're not in prison, and the reason is that we have
government of the people, by the sell-outs, for the corporations."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]