LWN.net Logo

Why learn Fortran?

Why learn Fortran?

Posted Jun 30, 2012 13:52 UTC (Sat) by HelloWorld (guest, #56129)
In reply to: Why learn Fortran? by dskoll
Parent article: Why learn C? (O'Reilly Radar)

> You cut out the parenthetical part of my statement pointing out the areas of difference.
That's because the issues I am referring to aren't an area of difference. Malloc exists in C++ and works the same as in C, so clearly there is no difference in that regard, and yet, malloc shouldn't be used in most C++ code.
There are areas of difference between C and C++ (such as the implicit conversion from void* to foo* and a few others), but that really isn't the issue.

> I am not a teacher, but I have taught a few people to program, and IMO learning C first and then C++ makes a whole lot of sense,
Just tell me why. I don't think that teaching people tons of stuff that they'll inevitably have to unlearn later on makes any sense.


(Log in to post comments)

Why learn Fortran?

Posted Jun 30, 2012 21:30 UTC (Sat) by dlang (✭ supporter ✭, #313) [Link]

Good programmers should learn many programming languages, as such the first one they learn should not need to be the one they will be using to make a living.

C has the advantage that it's small enough that you can teach the complete language in a short time (when was the last time you saw a language book as small as the K&R C book?, or even one only double it's size?)

That's a huge advantage for a first language.

The fact that other languages work differently just means that when you move on to those languages, you should be learning the new stuff, but already have a solid grounding in the basic stuff.

My High School computer classes started by teaching Basic, then had a class in algorithms, and then covered assembly, and only then branched out to other languages. It resulted in a much more solid grounding, and much more flexible thinking than would come out of any of the College programs I have seen.

Why learn Fortran?

Posted Jul 1, 2012 10:45 UTC (Sun) by HelloWorld (guest, #56129) [Link]

> Good programmers should learn many programming languages, as such the first one they learn should not need to be the one they will be using to make a living.
>
> C has the advantage that it's small enough that you can teach the complete language in a short time (when was the last time you saw a language book as small as the K&R C book?, or even one only double it's size?)
The Little Schemer, the Lua 5.1 Reference Manual. If the goal is to learn programming in general, I'd say that these language make much more sense than C -- no need to bother with memory management, mysterious bugs due to out-of-bounds memory access or C's idiosyncratic syntax and the preprocessor.

On the other hand, if your goal is to learn C++, learning C first doesn't make any sense either due to the reasons mentioned earlier. So unless you actually want to read or write C code, I don't see a reason to learn C.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds