texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] enums patch


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] enums patch
Date: Thu, 12 Sep 2002 20:34:06 +0200 (MET DST)

> The prepocessor is illiterate so he can generate code that does not
> even parse. This leads to evil searches in the huge output of gcc -E
> to figure out why the code does not even compile. An example if I
> include Qt headers before X ones, I get weird parse errors because of
> Qt symbols being the same as #define(d) ones by X.  Also, it is all to
> easy to define the same symbol with different value/types in different
> part. You can catch if the definition are visible from the compiler
> and the linker.

That is indeed a good reason.
Nevertheless, I do not want to let the *compilation* of TeXmacs
depend on anything more than it does now. That is one of the reasons
why TeXmacs will be reorganized into modules with clean interfaces.
In particular, the future glue with Qt should not have to access to
most of the data types and/or constants inside TeXmacs.

But: did you really experience these problems when gluing Qt and TeXmacs?

> I see no reason to shy away from enums. They group related consts
> which is a good thing. There is no reason to ask oneself metaphysical
> question about the type difference between bitmasks and "true"
> enumerations. The C++ language has no support for such differentations
> anyway so that is a moot point.
>
> Really, I did not expected to have to argue about a so minor patch.

I see two good reasons for not applying the patch:
  * The current code works fine so why touch it?
  * The metaphysical reason that we mentioned.
You should not underestimate the first point.
Your patch which imposed the bool type introduced a very subtle bug
caused by type overloading. It took me half a day to eliminate it.
It also took me half a day to carefully apply the patch,
thereby avoiding some other subtle bugs of the same kind.

My aim is certainly not to bother you, but you should understand that
I really have to do a lot of efforts to keep things coherent and clean.
Global changes which affect several files are by definition dangerous.

> More generally, I want TeXmacs to succeed to link with many libraries
> so that it can be used for many things. For doing that it is good to
> adopt mainstream conventions. I empathize with your notion of code
> purity but to suceed you code will need to have intercourse with other
> libraries and the mixing of code with wildely different conventions is
> _very_ ugly.

We *are* going to do this next year. Remember that the focus for
version 1.0 was on having a useable and (almost) fully featured
wysiwyg structured text editor. The focus for version 1.1
is on stabilization, which means:
  * More standard DTD's (style files; more or less done)
  * More standard User interface (done)
  * Better converters with standard formats (in progress)
  * Better documentation (in progress)
  * A clean scheme interface (coming up)
  * Clean rewriters for XML (coming up)
  * Modularization of the GUI (->Qt) (coming up)
  * Higher portability (coming up)
  * Etc.
But we *do* need time!

You can not change the coding conventions of a 100.000 lines program
in five minutes. The nogencc stuff is also still responsable for
several bugs which have not been fixed yet and for which I have to
wait for David to come back from hollidays. I am willing to make
a lot of changes in the future, but I want to make them at my rythm and
only when necessary. At the risk of being a bit frustrating for you...





reply via email to

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