Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!mtuxo!mtune!icus!gil From: gil@icus.UUCP (Gil Kloepfer Jr.) Newsgroups: comp.lang.fortran Subject: Re: Forced variable declaration Summary: Sometimes you have to be a bit more... Message-ID: <258@icus.UUCP> Date: 8 Feb 88 05:42:28 GMT References: <445@drilex.UUCP> <50500026@uxe.cso.uiuc.edu> Reply-To: gil@icus.UUCP (Gil Kloepfer Jr.) Organization: Bowne Management Systems, Inc., Mineola, NY Lines: 98 [Some irrelivant material removed from the following quote to keep followup size small] In article <50500026@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: > >>>The argument about mispelled variable names is a red >>>herring that any REAL Fortran scientific programmer would recognize. > >>****FLAME ON**** > >>Well Mr. "real Fortran scientific programmer" (I suppose you don't eat >>quiche either), what you have just said here is just so much rubbish that any >>"real" software engineer or serious programmer would recognise. Perhaps if >>you took more interest in Fortran language development you would have seen >>some things which might change your mind. > >>I cannot emphasise this enough: it is all very well to say "forced declaration >>is an unnecessary pain", but examination of the situation ***in reality*** >>shows that it is a NECESSARY pain (for large programs in particular). > >Really? I am getting tired of other prople trying to force religion on me. >It would seem that the answer would lie in the sort of program you >mention above, M.A.T. I have heard about it but never seen it. I'd love >to get a copy. Can you E-mail one to me? [Is M.A.T. a public-domain program or is it a commercial software product?] > >Actually, the question is moot as far as I am concerned. Despite all >the pain, the Fortran 8x proposal and other difficulties in Fortran, >particularly the rigid distinction between character and integer >variables, have sent me to C. I don't like to have to declare variables, >but do like the fact that integers, characters and logicals all can be used >easily together. I find it hard to understand how someone could object >to undeclared variables and not object to this. In fact, such people >probably like Pascal, straightjackets :-) :-) and the Marquis de Sade >:-) :-) :-) :-) :-). [I hate Pascal, straightjackets, etc... Did you ever try running your C programs through lint????] > >The best thing to do , which would unfortunately reduce the flame level >in comp.lang.c and comp.lang.fortran, would be to recognize that programming >style is a matter of taste. What is right for one is not right for another >. (FLAME ON! SMILEY FACES OFF! I recognize this. Do you? That was my point >when I said no smiles in my earlier posting. Flame OFF!)) Frankly, I >find flames fun. [I hate flames...] > >Doug McDonald Doug, Perhaps you have not been part of a software development team as part of a company which manufactures software. (or maybe you have, but have not shown so in your followup) The truth of the matter is this: nobody is trying to force any "religious" beliefs about declaring variables down your throat. What I think is trying to be said is that when you work on a program as part of a large system (that is SOFTWARE system, not HARDWARE)...it is maintained by more than just one person (generally) and must be written in such a manner that it is simple and cost-effective to debug and maintain. This is from a software development company's standpoint, and not for the casual user, number-cruncher, or university hacker. To make a long story short, in order to make software maintainable by more than just one person, certain software standards are developed. Further, it is difficult to find a mistake such as spelling a variable incorrectly in the middle of a large program when variable declaration for everything is not enforced. If I didn't see this problem myself, I wouldn't care either. However, I can see now why some programmers push this concept so much. As for forcing it ALL the time... I think it would be nice to be able to revert-back to having the implicit declarations when desired. However, being the senior programmer (and in charge of the programming standards for myself and those under me), I have pushed the idea of declaring all variables in a FORTRAN program for both clarity and to reduce the number of unnoticed bugs that will undoubtably occur as a result of misspelling or misdeclaring a variable. BTW: Nobody where I work objects to this rule... +====================================+========================================+ | Gil Kloepfer, Jr. | Net-Address: | | Senior Programmer | {boulder,ihnp4,talcott}!icus!gil | | Bowne Management Systems, Inc. | Voice: Home: (516) 968-6860 | | 235 E. Jericho Turnpike | Office: (516) 248-6840 x796 | | Mineola, New York 11501 | Internet: gil@icus.UUCP | +====================================+========================================+ | Disclaimer: My employers know I'm right, but will never admit to it... | +=============================================================================+