Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)
From: Robert I. Eachus (rieachus_at_comcast.net)
Date: 01/24/04
- Next message: Robert I. Eachus: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Previous message: Eric Merritt: "Re: Ada, XML and M$ Patents"
- 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:32:35 -0500
Marin David Condic wrote:
> Since different compilers often support (or don't support) different
> declarations, I'd like some way of saying "If I'm on Gnat - compile this
> declaration - if on Aonix, make this the declaration...". I don't know
> how that can happen at runtime. Likewise, when withing packages that may
> be compiler dependent and using statements from them, I'd like some way
> of doing that and I can't imagine how a procedure call of something that
> doesn't get withed is going to sneak past the compiler and get resolved
> at runtime.
Now I see why you worry about about illegal code and I don't. As far as
I am concerned, ANYTHING I can do to minimize differences between
versions is worth the effort. That certainly includes building
wrappers. So in the Ada 83 days when different compilers had different
names for the trancendental math packages, I had MY standard. (Usually
kept updated based on the latest NUMWG work, but that is a detail.)
Similarly, I had my package that did command line arguments, with
different bodies for Alsys and Verdix, etc. So I kept a collection of
'standard' packages needed for portability. If I needed to deal with
say, a bug in Solaris, I did it there.
The net result was one directory of implementation dependent packages,
with multiple implementations, and applications that were completely
implementation independent. I kept the package specifications for the
implementation dependent stuff identical, if necessary by making the
bindings thicker than might otherwise be needed. The only case where I
can ever remember a problem, Rational called me about one of my ADAR
packages that didn't compile due to an Unchecked_Conversion.
Rational didn't allow Unchecked_Conversions of access types. In
addition to telling them a work around, I suggested that they treat this
case as as a compiler bug. It involved an Unchecked_Conversion of an
object of an access type to the same access type. (Why did I do it? It
allowed me to put a with clause on a body instead of on the package
specification.)
--
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: Robert I. Eachus: "Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?)"
- Previous message: Eric Merritt: "Re: Ada, XML and M$ Patents"
- 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
|
|