On Mon, May 27, 2002 at 02:43:03AM +0200, Lars Gullik Bjønnes wrote:

> And why would you _have_ to do that?

http://movementarian.org/QWorkArea.h

a) I can't inherit from QWidget
b) I have to introduce a scoped_ptr for the painter (hold on, didn't we
   just try to remove those ???)

These individual problems are somewhat unimportant, but both are
symptoms of :

You are asking me, and all the other frontends, to make some
weirdo guarantee about a header file, namely that
frontend/FrontendWorkArea.h is not actually free for the frontend to
implement as it sees fit. "You must not include headers X,Y or Z. If you
need them you have to invent FrontendProxyWorkArea and forward all
requests back and forth. This header file is not really your header
file, it's just in your directory."

I do not want to lose the autonomy the frontends should have both for
technical and design reasons.

> Then work with me a bit, I am asking why a pointer and virtual
> functions are needed even when we never have one type of WorkArea in
> use. Do not see the need for either, so I need to be convinced.

It is IMHO wrong (and incidentally, rather awkward) for GUII code to
make demands on the exact contents of toolkit code.

Pure virtual methods are the closest C++ comes to interfaces. Why are
you arguing for un-natural code ? What exactly are your problems with
idiomatic code ?

I don't think the onus is on me; it is on you for preferring
non-idiomatic code, without giving reason.

Pimpl's /are/ idiomatic, but are simply clumsy.

Furthermore, what you are suggesting buys you /nothing/ in terms of
avoiding pimpls/virtual functions. Because of these odd demands that you
must make of our workarea header file, each frontend will be forced to
do this themselves, or route around the problem in some other way.

If I came to the LyX code in two years time, I would be very
disappointed to find out that including an X header in something
in frontends/xforms/ included that header all over the core.

regards
john

-- 
"Time is a great teacher, but unfortunately it kills all its pupils."
        - Hector Louis Berlioz 

Reply via email to