texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Refcounting, namespaces, const qualification


From: David Allouche
Subject: Re: [Texmacs-dev] Refcounting, namespaces, const qualification
Date: Tue, 15 Oct 2002 13:34:08 +0200
User-agent: Mutt/1.4i

On Tue, Oct 15, 2002 at 11:41:26AM +0200, Joris van der Hoeven wrote:
> > 
> > There is a C++ proverb which says "do not use a class when you need a
> > namespace". It would be probably easier and cleaner to just put all
> > those global variables in a 'TeXmacs' namespace, and maybe some nested
> > namespaces (e.g. edit, typeset, gui).
> > 
> > By the way... enums are namespace savyy, cpp symbols are not.
> 
> I just heard from a g++ developer that namespaces can cause severe
> problems when porting to Windows. Even though they are standard by now,
> we should temporarily be reluctant to use them...

That VC++ is borken piece of shit is old news. I would like to hear
the experience of windows developpers, especially with other
compilers.

By the way, could you post your reference?

May I remind you that developping for win32 implies buying a compiler
license (unless you somehow manage to get away with a gcc port, and
then I would like more information regarding the namespace problems),
and that VC++ in not the only solution available on the market,
especially considering that TeXmacs is not going to be strongly tied
to win32 (where VC++ is doubtlessly far superior to the competion).

And anyway, namespaces are now required by some g++ distributions. The
question is no longer "support namespace or not", but "how much
support for namespaces".


> > If you think 'const' readuces readability, you may use nested types.
> > For example 'in' for const reference (input parameter) and 'io' for
> > reference (inout parameter).
> 
> I do not want the names of types to get *any* longer,
> either by putting a "const" prefix or an ":in" suffix.

That is a performance issue. I once mesured a 15% performance increase
with a preliminary nogencc version built with -O2 optimization.

Your rejection of a change which is NOT purely stylistic on purely
stylistic grounds is very poor.

-- 
David Allouche         | GNU TeXmacs -- Writing is a pleasure
Free software engineer |    http://www.texmacs.org
   http://ddaa.net     |    http://alqua.com/tmresources
   address@hidden  |    address@hidden
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.





reply via email to

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