From: Robert Myers on
viper-2 wrote:
> On Jul 3, 11:27 pm, "e p chandler" <e...(a)juno.com> wrote:
>> <snip> [When was the last
>> time you saw Newton's method fall completely on its head?
>
>
> On January 29, when I posted clf's "Happy GNU Year" greeting:
>
> <http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/
> 3fb4a711c5c540d/>
>
> See:
> <http://www.codeartnow.com/gallery-1/freedom/gravitating-to-gnu>
> for a variation of the "Newton method falling on the head" thingy.
>
> :-)
>
> Fortran's design for handling "formula translation"/ "numeric
> computation" was one of my reasons for re-learning the language. I
> haven't coded in C for many years, so I really have no idea whether
> Fortran is still superior in this respect.
>
> People keep asking why I'm coding in Fortran and not C. So I keep
> reading the threads in this group hoping to find a convincing
> answer.:-)
>
The problem with any attempt to examine why Fortran might be preferable
for certain kinds of computing and not others is that almost any claim
you make, no matter how tentative, will devolve into counterclaims and
war stories and ultimately into a flame war.

Fortran has its advantages, not the least of which is that it isn't c,
and if you turn your code over to someone else, it's less likely to come
back with incomprehensible cleverness.

There are other, more technical advantages, but most of them also come
down to: it isn't c.

Robert.
From: viper-2 on
On Jul 4, 11:02 am, Robert Myers <rbmyers...(a)gmail.com> wrote:
>
> There are other, more technical advantages, but most of them also come
> down to: it isn't c.


"It isn't C" doesn't tell me much but it does sound loaded, suggesting
that if you were more specific you'd risk starting a flame war.

I do remember that with C I'd have fun using pointers everywhere. With
Fortran, I'm still looking for an excuse to use a pointer instead of
an allocatable array in my current program. Googling, I came across a
thread in the archives recommending allocatable arrays over pointers
except in certain instances. So it seems that perhaps the development
of Fortran might be a more carefully considered process, possibly
benefiting from practices in C?

agt


--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: agt(a)codeartnow.com
From: Gordon Sande on
On 2010-07-05 11:18:58 -0300, viper-2 <agt(a)codeartnow.com> said:

> On Jul 4, 11:02�am, Robert Myers <rbmyers...(a)gmail.com> wrote:
>>
>> There are other, more technical advantages, but most of them also come
>> down to: it isn't c.
>
>
> "It isn't C" doesn't tell me much but it does sound loaded, suggesting
> that if you were more specific you'd risk starting a flame war.
>
> I do remember that with C I'd have fun using pointers everywhere. With
> Fortran, I'm still looking for an excuse to use a pointer instead of
> an allocatable array in my current program. Googling, I came across a
> thread in the archives recommending allocatable arrays over pointers
> except in certain instances. So it seems that perhaps the development
> of Fortran might be a more carefully considered process, possibly
> benefiting from practices in C?
>
> agt

One way of expressing might be to say that C is a high level assembler while
Fortran started with a relatively simple programming model.

An assembler programmer is comfortable with pointers and wants to have
complete control over them. All details are open and must be attended to!

The original Fortran was intended to manipulate more mathematically styled
objects like vectors and matrices and had a relatively simple storeage model
in mind. A goodly variety of details are predetermined so that the programmer
can pay more attention to relevant issues. If you insist on fighting those
details then Fortran is not for you (and you should not try following the
CompSci text intended for C).

Both have had to deal with reality over time so that the intents have had
to made precise. In Fortran that lead to things like the no aliasing rules
being imposed on the programmer and all the needs for side issues like
characters. Initially characters in Fortran were a disaster becuase there
were none except the adhoc nonstandard hacks. Now Fortran has very good clean
characters (even though they do not exacly follow the CompSci C based style).
Fortran had weak programming structuring aids (common, subroutines were
about it)
but the Fortran 90 modules are pretty good. If one uses F90 the number
of errors
that the compiler can catch are pretty impressive. C does not quite match F77
on that.



From: viper-2 on
On Jul 5, 10:44 am, Gordon Sande <Gordon.Sa...(a)gmail.com> wrote:
>
> One way of expressing might be to say that C is a high level assembler while
> Fortran started with a relatively simple programming model.
>
> An assembler programmer is comfortable with pointers and wants to have
> complete control over them. All details are open and must be attended to!
>

Goodness, I'd forgotten about all the fun I used to have writing code
for the Intel 80286. In the third (penultimate year) of my BSc
engineering program, we were introduced to microprocessors in the
digital systems course. They taught too many courses and too many
topics in any one course, so the class as a whole didn't have enough
exposure to assembly language hacking for the kind of questions set on
the final examination.

I remember that the lecturer for that course set a question requiring
us to write 80286 code to multiple two numbers. He walked past me the
next day and looked at me, as if I were a ghost. I was the only
student able to do the question - which apparently he hadn't expected
anyone to be able to do. From the moment I saw the question, I
wondered why on earth he had included it on the exam. What I didn't
tell him was that I'd become quite addicted to assembly, and since
neither his lectures nor his labs gave me enough of a fix, I had found
a little Wiley publication (I forget the name) that did the trick. I
digested it during coffee breaks and again for desert at dinner
time.:-)

No wonder I enjoyed playing with pointers in C. So that's a little war
story of my own you can chuckle at. At least two members of this group
have a sense of humour, but my jokes lately (like the Newton's method
falling on the head thingy, above) don't quite seem to be hitting the
mark.:-)


A goodly variety of details are predetermined so that the programmer
> can pay more attention to relevant issues. If you insist on fighting those
> details then Fortran is not for you

Why fight the issues? Actually, I suspect that some Fortraners hack
numerical problems in Fortran, and then interface the code with C to
accomplish performance tweaks at low level. That might be one way to
go?

agt


--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: agt(a)codeartnow.com



From: viper-2 on
On Jul 5, 12:48 pm, viper-2 <a...(a)codeartnow.com> wrote:
> I
> digested it during coffee breaks and again for desert at dinner
> time.:-)
>

Oops! I meant "dessert".

:-)

agt


--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: agt(a)codeartnow.com