Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)
From: Robert I. Eachus (rieachus_at_comcast.net)
Date: 01/24/04
- Next message: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Previous message: Robert I. Eachus: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- In reply to: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Next in thread: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Reply: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 24 Jan 2004 10:39:50 -0500
Marin David Condic wrote:
> I suppose if we had some kind of "conditional with" we could construct a
> few more layers of indirection and provide alternate implementations
> that are picked up by the compiler. Some version of:
>
> with if (condition) Gnat_Solution ;
> with if (condition) Aonix_Solution ;
>
> and assuming that Gnat_Solution and Aonix_Solution have an identical
> interface (just different bodies) a similar "conditional use" in the
> right context would let you connect to the right thing.
But again you are trying hard to make things difficult for yourself.
First, if the interface to Gnat_Solution and Aonix_Solution are
identical, why do you want to make source that uses the interface
compiler dependent? Both the Gnat and Aonix packages should be named
Solution. ;-)
Now that you have gone that far, you have banished all of the compiler
dependencies to the body of Solution. Either use the tricks I
described, or if the bodies are so different that it makes sense to
mantain them separately, provide them as separate files, and use
different makefiles for Aonix and Gnat. (Gnat likes to dictate the
names of files, but it does provide facilities for overriding that.)
--
Robert I. Eachus
"The war on terror is a different kind of war, waged capture by capture,
cell by cell, and victory by victory. Our security is assured by our
perseverance and by our sure belief in the success of liberty." --
George W. Bush
- Next message: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Previous message: Robert I. Eachus: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- In reply to: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Next in thread: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Reply: Marin David Condic: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|