On 11/29/18 10:22 AM, Stu Midgley wrote:
But yeah, C can do anything Fortran can do, and then some. People do
not write operating systems in Fortran for a reason.
I've written a fortran-like scripting language (and the bones of a
basic compiler) in Fortran... everything you can do in C you can do
in Fortran.
People often use the lack of pointers as a reason to NOT use Fortran,
which is rubbish. Just allocate the whole address space and go to
town with your own pointers. Which... if you really think about it is
all that C does. In theory the concept of a SIGSEG is only an OS
limitation on C. You "can" in theory just allocate any address you
want without allocation and pre-allocation.
VMS comes to mind as a Fortran programmable OS. I seem to remember
other grad students ... er ... patching things ... with negative array
indexes on Vaxen. Though that's a while ago, and I might be suffering
from ENOTENOUGHCOFFEE.
I wrote a command like argument processor for my fortran code like
30-ish years ago (eek!) so I could at least pass arguments in "easily".
I remember that was one of the things that caused me to look at C
originally.
I love the "lets allocate all of memory and work in this giant
heap-o-stuff" approach in Fortran. Works great, until you have a
routine with a slightly different view of how the memory is mapped.
Then you get C-like pointer aliasing problems. And debugging issues.
Yeah, one giant heap, a memory map and a debugger. Fun times (I had
done quite a bit of that spelunking in the past). I'd much rather leave
the days of huge global common blocks alone.
Modern fortran appears to be much better at allocation and management of
memory than C (where it is absolutely explicit). Likely it is far
smarter on layouts as well, with various NUMA and heterogeneous
processing systems.
--
Dr Stuart Midgley
sdm...@gmail.com <mailto:sdm...@gmail.com>
_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Joe Landman
e: joe.land...@gmail.com
t: @hpcjoe
w: https://scalability.org
g: https://github.com/joelandman
l: https://www.linkedin.com/in/joelandman
_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf