Modern language with the advantages of FORTRAN?

后端 未结 12 1977
灰色年华
灰色年华 2021-02-05 19:04

I\'ve been working with a lot of FORTRAN 77 lately, and though I had reservations at first, I now see some great qualities of the language. It is:

  • Simple to learn
相关标签:
12条回答
  • 2021-02-05 19:28

    You may be looking at MATLAB. Many engineer undergraduates learn that so I think it's easy for non-programmers to grok.

    If you want to get hardcore, take a look at J.

    0 讨论(0)
  • 2021-02-05 19:33

    Simple to learn (no object-oriented or functional-programming complications)

    Easy to read

    Blazing fast at number-crunching

    Sounds like C.

    Buy Numerical Recipes in C. That pretty much covers all the bases in a clear, readable style.

    http://www.amazon.com/Numerical-Recipes-Art-Scientific-Computing/dp/0521431085

    0 讨论(0)
  • 2021-02-05 19:34

    Or is the answer Fortran 90, 95, 2003 . . . ?

    Yes. Fortran 95 supported by most compilers is the language you are looking for. However Fortran 2003 has some major enhancements (besides unnecessary from your point of view support of OOP) which might be useful. Compiler Support for the Fortran 2003 Standard.

    0 讨论(0)
  • 2021-02-05 19:34

    Well, I'm a non-programmer engineer (whatever that means; I gather it means not having much contact with computer sciences studies) and ...

    Partically in continuation to JasonFruit's comment on S. Lott's answer:

    Yes, the standard has added quite a few features from F90 to 2003. But the "problem", if one can call it such (I cannot think or care to of a more appropriate word) is that many people who use Fortran do not know it, save the basic features they need. It is a blessing and a curse all in one, in a way. They have never learned it, never read a book on it - they kinda just picked it up as they went along. That way can certainly work for a time (if you structure your programs simply, as many have done for centuries, and have a sort of mental discipline, this approach can last for a lifetime/your entire career), but after a while it starts to show its disadvanages. Try for example, following some of the discussions on the recent features on comp.lang.fortran to test your knowledge.

    So, take a good book (many recommend one of the three for beginners; a) Chapman J. Stephen's b) Maine, or c) Metcalf, Reid and Cohen (known as the "M.R.C. book") - after which a lot of the "more obscure" features not only become clearer, but also "obvious" (as in a way; this really is the better way - why did I did it that way ... before?).

    That takes care of that question. Now, the other question -- which will certanly arise -- is Fortran worth learning nowadays? (it always does, trust me on this :). This has been covered numerous times, so I'll just direct to my own post regarding the above, and my older post (you'll have to scroll a little down) which regards some issues in comparison with some of the other langugages mentioned here.

    The last thing, which is in a way the cause of all these question in most cases is people opinion on Fortran, with the emphasis on opinion! Generally speaking (and we can take this forum as a pretty good sample for our analysis) is that it's not so good. Few like it [ follow questions marked fortran on this forum for a month, and you'll quickly learn who they are. Btw, judging from the frequency your name's been appearing, you're quickly becoming a member of the club :) ], most are either indifferent, and some hate it, out of sheer ignorance (comparing F66 with today's languages is often used), some out of their own reasons. Now, if we take those and compare it with the general population, by simple an account, the result is bound to come out bad. If you interviewed just traditional engineers the results would be quite different.

    Thhhh-aaa-ttt's it.

    Oh, one more thing - Fortran is/was and still remains primarily aimed at engineers, not mathematicians. It is better suited for solving large systems, then calculating pi to a ka-zi-llionth decimal. I don't know if that was a typo in your question, or intentional. For purely mathematical applications (in a classical sense of mathematician) I would (were I a part of that field) probably choose, I don't know, Mathematica? Or Pascal (don't know why it was always Pascal; but it seems terribly popular with those chaps).

    0 讨论(0)
  • 2021-02-05 19:35

    I assume you are considering small, dedicated programs written to solve specific problems. In that case, if the complexity of OO really bothered you I'd just write a C# or Java app and not use OO. Visual Basic should be pretty darn fast these days as well.

    Nearly all compiled languages will be mathematically quick these days, all operations are done on the math co-processor--so unless you have found some language to be particularly lacking I wouldn't let any languages "math speed" bother me much.

    0 讨论(0)
  • 2021-02-05 19:37

    If you're really excited about using Fortran, you might consider using Fortran for Microsoft.NET. The idea behind this project is that it allows you to use the Fortran language while taking advantage of a mangaged code environment via the Common Language Runtime (CLR).

    0 讨论(0)
提交回复
热议问题