comp.lang.ada
 help / color / mirror / Atom feed
From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 )
Subject: Re: re: conditional compilation
Date: 12 Dec 89 13:14:38 GMT	[thread overview]
Message-ID: <7403@hubcap.clemson.edu> (raw)
In-Reply-To: 8912120008.AA19332@mbunix.mitre.org

From emery@MBUNIX.MITRE.ORG (Emery):
>>   Now are you REALLY contending that any competent maintainer is 
>>   going to fail to understand the following?
> 
>>     type foo_bar (MACHINE : SYSTEM.NAME := SYSTEM.SYSTEM_NAME) is record
>>        X : Integer;
>>        case MACHINE is
>>           when VAX => Y : Float_64; 
>>           when IBM_PC_WITH_8087 => Y : IEEE_Float;
>>        end case;
>>     end record;
> 
> 	1.  There is no guarantee that an arbitrary compiler will have
> either of the two enumeration values "VAX" or "IBM_PC_WITH_8087" in
> the type SYSTEM.NAME.   [...]

   The point is that the construction would be easily understood
   by a hypothetical maintainer.  There is a need to standardize
   the set of SYSTEM.NAMEs on each pass of the validation cycle, 
   but a similar problem would arise with the proposed conditional
   compilation mechanism.  If one environment had IBM_PC_WITH_8087
   and another expressed the same hardware as IBM_PC_8087_CPU, the 
   lack of name standardization would be similarly troublesome.

   Once this standardization (required in either case) is accomplished,
   the problem is solved.  There is no need for conditional compilation.

> Furthermore, there are many reasons besides host machine name for
> doing separate compilation.  One that comes immediately to mind occurs
> when a specific feature is present or absent from the version of the
> operating system generated for a given machine.  I've seen this rather
> frequently in Unix.

   Appropriately handled in the package which provides the binding to
   the operating system involved.  OS bindings must also be standardized,
   and this is taking place; e.g., the IEEE 1003.5 Ada binding to Posix.
    
   Conditional compilation would introduce an entirely new mechanism;
   such a move must be justified in terms of benefits which cannot
   reasonably be obtained using existing mechanisms.  The situations 
   cited thus far do not appear to satisfy this requirement.  


   Bill Wolfe, wtwolfe@hubcap.clemson.edu

  reply	other threads:[~1989-12-12 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-12-12  0:08 conditional compilation Emery
1989-12-12 13:14 ` William Thomas Wolfe, 2847  [this message]
1989-12-14 20:07   `  Sun Visualization Products
replies disabled

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