From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_05,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!cc.utah.edu!rcapener From: RCAPENER@cc.utah.edu Newsgroups: comp.lang.ada Subject: Re: Design/Development questions Message-ID: <67999@cc.utah.edu> Date: 7 Jun 90 10:34:08 GMT References: <677@tfsg.UUCP> List-Id: In article <677@tfsg.UUCP>, dennis@tfsg.UUCP (Dennis Gibbs) writes: > <> > > I have a couple of hypothetical questions regarding C and Ada: > > 1) If you have a software design, all things being equal, if you implement > the design in both Ada and C, which implementation will have the highest > number of lines of code, the C implementation or the Ada implementation? > How much percentage-wise(more or less) on average, would the difference > be? Well, you said it, all things probably are equal, including the lines of code. Some C programmers put the '{' at the end of the line, and the others put it underneath the 'if', 'else', 'switch', et al. It SEEMS like they are about equal to me. > 2) I remember seeing various studies that show the length of time spent > developing software systems from the earliest design stages to final > delivery. Again, in a perfect world, would it take more or less time > to design and develop in Ada vs. C? I am excluding the maintenance/ > enhancement phase in this question. If I recall I believe I have seen > studies somewhere that show that it takes the same amount of time > overall to design and develop in Ada vs. other languages, but that more > time is spent in design and less spent in coding for Ada. Can someone > direct me to any studies that investigate this issue? > This is a real thorny question, since Ada can provide far more protection to the programmer than C does. But on the other hand, many programmers who code in C don't want to code in Ada, and vice-versa. There are some absolutely brilliant programmers coding in C because they prefer more freedom to create (or hang themselves). It seems the time spent is in direct proportion to how modular (or better, object oriented) a language is. The more modular it is, the more reusable the code is, and the less you have to totally rewrite anything. > I do not wish to start more C vs. Ada flame wars again, my purpose is to > start an informative, educational discussion on this subject.... > Awww, why not? Do you really want a dry, dull, drab world? Now that I have added my two bits on the above, all of which is totally and purely subjective, I have a question to ask people on the net. In VAX-Ada, the GET and the GET_LINE procedures have the very disconcerting behavior that when you get a string, you must enter the EXACT number of characters the string is declared for. Is this behavior part of the LRM? Does anyone in NetLand have the equivalent of C's fgets for strings in Ada? Any input (pun intended) on solving this problem will be appreciated.