comp.lang.ada
 help / color / mirror / Atom feed
* RE: Preprocessor functionality equivalent ideas needed
@ 2003-12-11 12:52 Lionel.DRAGHI
  0 siblings, 0 replies; 11+ messages in thread
From: Lionel.DRAGHI @ 2003-12-11 12:52 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: Steve [mailto:nospam_steved94@comcast.net]
..
| Support for multiple configurations is not built into the 
| language, but many
| development environments do.


If just considering build time configuration, my experience is that you
should consider in this order:
1 - programmming possibilities. As statted by Georg Bauhaus, there are many
way to manage multiple configurations at langage level, with idioms or
design patterns. This is the best way because the compiler is the the more
reliable way to build and check a configuration.

2 - sources selection : you need to select the right sources for each
configuration. Note that this is pretty unavoidable even when using idioms
and patterns.

3 - sources modification : macro-generation, preprocessing, etc. It's some
time hard to avoid, but sources will be less readable, build is less
straightforward, and most of the tools will no more understand the sources,
as those are no more Ada. 
For example, if you use GNAT preprocessor, you will depend on GPS to read
the sources, or fall back on whatever simple text editor. If you use your
own preprocessor, it's even worse.

So, I recommand you to consider programming way before development
environments.

-- 
Lionel Draghi



^ permalink raw reply	[flat|nested] 11+ messages in thread
* RE: Preprocessor functionality equivalent ideas needed
@ 2003-12-11 15:51 Lionel.DRAGHI
  0 siblings, 0 replies; 11+ messages in thread
From: Lionel.DRAGHI @ 2003-12-11 15:51 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: Marin David Condic [mailto:nobody@noplace.com]
| This is especially 
| true where I might need to keep code portable between two different 
| compilers. Also its a big problem when what needs to be 
| different is in 
| the *specification* of something. (Yes, I know, "One more layer of 
| indirection...." can go fix it - but why should it be so hard?)

The whole point is what is harder, pre-processing or redesign?
I don't think there is a unique generic answer, but I observe that
pre-processing is often choosen because it's easier to settle down in the
*short term* than some redesign.  

-- 
Lionel Draghi



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Preprocessor functionality equivalent ideas needed
@ 2003-12-10 20:04 Greg Milford
  2003-12-10 21:41 ` Ludovic Brenta
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Greg Milford @ 2003-12-10 20:04 UTC (permalink / raw)


Hello

I checked the FAQ for this group and did not get an answer to this.  I know
Ada does not have a preprocessor, so how should I go about maintaining
changes to a common code base that needs to be built under two different
configurations?

Am I left with using Global variables or has a better method been used?  I
am new to Ada so be kind :)

Greg





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-12-12  5:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-11 12:52 Preprocessor functionality equivalent ideas needed Lionel.DRAGHI
  -- strict thread matches above, loose matches on Subject: below --
2003-12-11 15:51 Lionel.DRAGHI
2003-12-10 20:04 Greg Milford
2003-12-10 21:41 ` Ludovic Brenta
2003-12-10 22:29 ` Georg Bauhaus
2003-12-12  5:52   ` Simon Wright
2003-12-11  1:07 ` Jeffrey Carter
2003-12-11 13:34   ` Marin David Condic
2003-12-11 17:49     ` Jeffrey Carter
2003-12-11  5:39 ` Steve
2003-12-11 16:59 ` Martin Krischik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox