Xref: utzoo comp.lang.fortran:741 comp.lang.c:10686 Path: utzoo!utgpu!water!watmath!clyde!att!mtunx!rutgers!cmcl2!nrl-cmf!ames!pioneer!eugene From: eugene@pioneer.arpa (Eugene N. Miya) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Summary: More comments about the Fortran and C Keywords: RATFOR, STRUCT Message-ID: <10032@ames.arc.nasa.gov> Date: 8 Jun 88 20:26:21 GMT References: <10655@agate.BERKELEY.EDU> <1857@hubcap.UUCP> <10023@ames.arc.nasa.gov> Sender: usenet@ames.arc.nasa.gov Reply-To: eugene@pioneer.UUCP (Eugene N. Miya) Organization: UC SB Lines: 61 I have been asked to post this. Please send mail to him, not me. Thanks. --eugene ============mesg start=============== Some flames for thought ... I agree that Fortran is a somewhat primitive language and that a better language for scientific programming would be nice. I see two issues in making transition to something better. The first is the choosing of a suitable replacement language. The second is that of translating Fortran Dusty Decks. 1. Choice of Language I do lots of programming in both C and Fortran. I think C is not the answer. It's too low level. Multidimensioned arrays in C are hard to implement well and in a way that will be portable. One person's idea of how to implement multidimesioned arrays will differ from another's. Now try to write code that will handle both! YECH! Fortran 8X is not the answer. It's a "dirty" language (to put it mildly). This is my personal debatable opinion. The approch by the committee here seems to be "let's add stuff we think is neat and hope over the next 20 years that people decide on their own that they shouldn't use things like COMMON, EQUIVALENCE, and column oriented format." I don't see much chance of success in this approach. OK, How about Ada? I am _very_ new to this language but it seems to be able to handle much of what one might desire for scientific programming. Code writtin in Ada has a good chance of being portable. The problem with this language seems to be its complexity. It won't run nicely on a small (PC class) machine. I wonder whether a possible solution to this problem is to define a sublanguage of Ada for scientific computation. That is, maybe some features could be removed to make the language run on small machines and still be nice for scientific computation. Will removing the task handling and exception handling fix the complexity problem? 2. Tranlation What are the problem areas of tranlation of Fortran into other (more sane) languages (e.g., C, pascal, Ada)? A few problem areas I see are a. multidimensioned arrays. Fortran code is _often_ optimized to account for Fortran's columnwise storage of 2-D arrays. Pascal (and Ada, I assume) store rowwise. b. EQUIVALENCE c. COMMON Any more here? Matt Wette mwette%gauss@hub.ucsb.edu