Xref: utzoo comp.lang.fortran:777 comp.lang.c:10793 Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Message-ID: <750@garth.UUCP> Date: 17 Jun 88 19:33:03 GMT References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 31 Church: Our Lady of Reluctant Software First of all I agree with Dijkstra with respect to Fortran. I feel the challenge designing a new language that can be Fortran at its own game, which C does not do. > Now here there seems to be a little misunderstanding. I have never >understood why Fortran users keep saying that array indexing is awkward >in C. This is probably because they find the idea of having to allocate >memory for an array rather repulsive. A Fortran compiler is permitted to allocate all arrays statically, before compilation, and many do this. Also Fortran subroutine are not required to be recursive and hence do not need a procedure frame. All allocation can be done in the compiler and the runtime overhead can be zero. Also it is easy for programmer to modify the array base address to implement nonzero lower bounds. It is also easy for the compiler. I suspect Fortran programmers know alot less about dope vectors biased base addresses and that ilk than C programmers (scientists and engineers vs. computer science and system programmers). > i) Argument are passed by value, which translates to > the fact that to let a subroutine change a variable > you have to specify it (by passing its adress). And simplifies defined/referenced detection for an optimiser. > ii) You can define your own data structures, Apparently some Fortran programmers equivalence different typed arrays to create structures (shudder). Nature is immacuately fair and implacably cruel -- Sara James.