[comp.lang.ada] Tucker's new proposal

billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) (12/23/89)

From stt@inmet.inmet.com:
> I *can* imagine a careful definition of conditional
> compilation mechanisms which would preserve the ability to
> recompile from parse trees.  This would *not* be a preprocessor
> approach, however.  [...] 
%
%    Allow if constructs and case constructs within a sequence of
%    declarations, so long as all conditional and case
%    expressions are static, and each if/case "arm" contains
%    only declarations (rather than statements).
% 
> The nice thing about this kind of approach is that it builds on the
> existing concepts of the language (namely static expressions,
> if/case constructs, and variant records), rather than introducing
> a new/foreign syntax like "#ifdef".  

   I must be getting a bit too much of the spiked eggnog myself,
   because this is actually starting to sound like not too bad an
   idea...  can anyone think of counterarguments?  


   Bill Wolfe, wtwolfe@hubcap.clemson.edu

xanthian@saturn.ADS.COM (Metafont Consultant Account) (12/30/89)

In article <7518@hubcap.clemson.edu> billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu writes:
>From stt@inmet.inmet.com:
>> I *can* imagine a careful definition of conditional
>> compilation mechanisms which would preserve the ability to
>> recompile from parse trees.  This would *not* be a preprocessor
>> approach, however.  [...] 
>%
>%    Allow if constructs and case constructs within a sequence of
>%    declarations, so long as all conditional and case
>%    expressions are static, and each if/case "arm" contains
>%    only declarations (rather than statements).
>% 
>> The nice thing about this kind of approach is that it builds on the
>> existing concepts of the language (namely static expressions,
>> if/case constructs, and variant records), rather than introducing
>> a new/foreign syntax like "#ifdef".  
>
>   I must be getting a bit too much of the spiked eggnog myself,
>   because this is actually starting to sound like not too bad an
>   idea...  can anyone think of counterarguments?  
>
>
>   Bill Wolfe, wtwolfe@hubcap.clemson.edu


Sure.  If you implement and encourage use of a "cpp" type
preprocessor, you completely demotivate the efforts to actually clean
up the portability problems in the existing language standard by
providing an out, and the ideal of programs that compile and execute
the same on all (reasonably configuration compatible) platforms goes
right down the tubes.  The completely predictable result is Ada
programs characterized by the nest of twisty #ifdef's, all different,
that make maintenance of any substantial C program such a heartache.
Not A Good Thing(tm).  ;-)

Again, my opinion, not the account furnisher's.
xanthian@well.sf.ca.us
Kent, the (bionic) man from xanth, now available
as a build-a-xanthian kit at better toy stores.