comp.lang.ada
 help / color / mirror / Atom feed
From: Colin James 0621 <cjames@dsc.blm.gov>
Subject: Re:  Software vendors not using Ada but C
Date: Fri, 18 Jun 93 8:19:07 MDT	[thread overview]
Message-ID: <9306180819.aa14968@dsc.blm.gov> (raw)

Ted Holden writes that "Programs written in geneic C port, from just about
anything to just about anything else".
  
This argument is mistaken as anyone knows who has worked on a larger C
project of greater than 10,000 lines of code.

Consider the generic C statement:  c=a+++b;  .

This ambiguous statement can mean four things which are all equally 
admissible as ANSI C:
  
1.  a = a + 1 ;  c = a + b ;
2.  b = b + 1 ;  c = a + b ;
3.  c = a + b ;  a = a + 1 ;
4.  c = a + b ;  b = b + 1 ;
  
Note that Appendix F of the the ANSI C standard suggests that in cases 
where language syntax is ambiguous, the use of spaces can alleviate
confusion.  But who ever heard of an ANSI language which relies on 
spaces to que the compiler.  
  
Also, Mr Holden's argument fails with floating point math for this reason.
Two ANSI C compilers on the same hardware platform can produce different
numerical results because the math stuff in C is done at runtime and it
is not required to be implemented according to any standards.  This is
why banks and financial institutions have been burned when herded to C.

If C is portable as Mr Holden suggests, then why is it that C ports from
one platform to another take so long.  For example when Oracle ported from
the DEC VAX to the IBM PC it took longer than six hours, six days, six,
weeks, and six months.  Another example is Windows NT Beta which supposedly
has four million lines of code and is by most accounts still at a pre-
release alpha level which the eager public is willing to pay for to debug.
  

             reply	other threads:[~1993-06-18 14:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-06-18 14:19 Colin James 0621 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-06-22  6:50 Software vendors not using Ada but C cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!cs.utexa
1993-06-22 12:30 Mike King
1993-06-22 15:33 agate!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!col.hp.com!cs
1993-06-23 19:07 Bill Yow
1993-06-23 20:33 Robert Firth
1993-06-23 20:44 cis.ohio-state.edu!math.ohio-state.edu!uwm.edu!ogicse!netnews.nwnet.net!n
1993-06-23 22:10 Michael Feldman
1993-06-24  6:05 ghost.dsi.unimi.it!univ-lyon1.fr!scsing.switch.ch!epflnews!disuns2.epfl.c
1993-06-25 23:39 Mark Bayern
1993-06-27 12:38 David Weller
replies disabled

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