Path: csiph.com!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: cross@spitfire.i.gajendra.net (Dan Cross) Newsgroups: comp.programming Subject: Re: C and fortran, math power Date: Sun, 22 Apr 2018 13:18:03 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 36 Message-ID: References: NNTP-Posting-Host: spitfire.i.gajendra.net X-Trace: reader1.panix.com 1524403083 12840 166.84.136.80 (22 Apr 2018 13:18:03 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Sun, 22 Apr 2018 13:18:03 +0000 (UTC) X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross) Xref: csiph.com comp.programming:8692 In article , Bill Cunningham wrote: > The thing about fortran is that it is so good with mathematics. Nowadays >with C's new stdint.h and complex.h and so on new headers, would it be worth >learning fortran? I guess I am asking for the opnions of those who know >both. Among other reasons, due to the way that Fortran handles pointer aliasing and due to its history as a language in which one wrote high performance code, Fortran compilers are very good at optimizing mediocre code. For the opposite reasons, it is more difficult (though by no means impossible) for C compilers to optimize as aggressively. That said, the dominant C compilers these days do an excellent job of producing object code that's performance-competitive with Fortran. Is it "worth it" to learn Fortran? I think that really depends on your definition of value.... I would argue that it's worth learning any number of languages because breadth of exposure to different programming paradigms and techniques gives one perspective from which to deepen one's understanding of the discipline of programming. Learning Fortran certainly has merit in this sense. Whether you'd write new, producion-quality, HPC code in Fortran is a different matter. I think I'd largely argue against that unless there was some other compelling reason: the target audience for your program is Fortran-centric; you want to leverage an existing body of Fortran code; you need some unique property of a specific compiler [though this last one is highly suspect], etc. - Dan C.