[Top][All Lists]

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

Re: [lmi] Code review: product editor

From: Vadim Zeitlin
Subject: Re: [lmi] Code review: product editor
Date: Mon, 5 Mar 2007 17:07:44 +0100

On Thu, 01 Mar 2007 18:15:15 +0000 Greg Chicares <address@hidden> wrote:

GC> (2) I'd prefer to use standard types instead of wx types where
GC> possible.

 It was my fault originally: I thought that it would be better to use
wxString in the "purely GUI" parts while continuing to use std::string

GC> (3) Let's try to eliminate macros and especially the boost
GC> preprocessor library from the product editor if possible.

 Personally, I think boost preprocessor is one of the most useful boost
libraries because it allows to do things which would be so impractical
as to be considered impossible. Basically it allows to implement vararg
templates which might be included in C++ standard in a couple of years (and
become available in widely used compilers even later) right now.

GC> And class MultiDimTable##n seems to be used only with 'n' values
GC> of one and seven.

 Right now, yes. But it's very easily extensible if anything changes.

GC> Suppose we just wrote two distinct class templates that didn't use the
GC> preprocessor--or especially the boost preprocessor library, which I
GC> think we could then eliminate entirely.

 I have the impression that you see some benefit in eliminating the use of
this library that I'm missing. As lmi uses several other boost libraries
and so boost headers are available anyhow, what exactly is the problem with
using this one?

GC> (4) I dread dereferencing a null pointer. That can cause a crash.
GC> (5) I've come to believe that 'new' and especially 'delete' are
GC> generally to be avoided

 I absolutely agree with these points, of course. Sorry for missing them in
the multidim grid code.


reply via email to

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