Mail Archives: djgpp/1998/05/15/17:00:32
From: | "Paul Derbyshire" <pderbysh AT usa DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
References: | <m0yaM2C-000S41C AT inti DOT gov DOT ar>
|
Subject: | Re: COFF obsolete, let's port to Elf for version 3
|
Lines: | 45
|
Organization: | The Chaos Zone
|
MIME-Version: | 1.0
|
Message-ID: | <xY171.7421$z15.4328264@news21.bellglobal.com>
|
Date: | Fri, 15 May 1998 20:54:53 GMT
|
NNTP-Posting-Host: | 206.172.182.62
|
NNTP-Posting-Date: | Fri, 15 May 1998 16:54:53 EDT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Salvador Eduardo Tropea (SET) wrote in message ...
> Wait a minute. There a mechanism (used in 2.7.x) that allows the use of
> templates (avoiding collisions because of multiple definitions) using some
> #pragma definitions (I use it in my editor, I have a silly array template).
Can
> you explain what's wrong with it?
It's a pragma! It's nonstandard as hell, and worse, you can't just wrap it in
#ifdef DJGPP's, because you also have to use a totally nonstandard architecture
of .h and .cc files. There's no way to use this pragma and get portable code
even with conditional compilation out the wazoo. Nevermind this doesn't solve
the problem when it involves standard library templates, e.g. vector. Unless
you want to go and rewrite half the headers and library sources.
As for explicit instantiation and -fno-implicit-templates, although the code
can be written standard, there's no way to instantiate everything connected
with the standard templates, such as vector. Even if you track down every
little function and inner class and instantiate them all, the results are very
implementation dependent and would require a horrendous maze of #ifdef's and
typedefs. And every time the library changed, you'd have to change all your
code... the exact thing hiding implementation details in the library is
supposed to prevent.
There are only 2 viable solutions to the template problem.
1. Repositories. Elegant and efficient. If only the damn things worked.
2. Borland model, which requires ELF.
> [download] http://www.planet.net/pjoshv/
Whoa, what the heck is it, before I go downloading anything...
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot |http://www3.sympatico.ca/bob.beland/indexn2f.html
_____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|
- Raw text -