I?ve been teaching an /Intro to Scientific Computing/ class for nearly
10+ years. This class is intended for second year engineering students
and, as such, places a large emphasis on numerical linear algebra.
Like the rest of Academia, I?m using a combination of Python and numpy arrays for this. Yet, after all these years, I start to believe it
ain?t necessarily the right choice for a first encounter with
numerical linear algebra. Obvisouly everything is not black and white
and I?ll try to be nuanced. But, in my opinion, a strongly typed
language such as Fortran might lead to an overall better learning experience. And that?s what it?s all about when you start Uni:
learning the principles of scientific programming, not the quirks of a particular language (unless you?re a CS student, which is a different crowd).
Best wishes, and happy switching from Python to Fortran 77!
Johann "Myrkraverk" Oskarsson <johann@myrkraverk.invalid> schrieb:
Best wishes, and happy switching from Python to Fortran 77!
Fortran 77 makes little sense, modern Fortran variants (Fortran
90+) are available with free compilers and offer much more comfort
and safety.
When I write Fortran, what I really mean is modern Fortran, not
FORTRAN. Anything pre-dating the Fortran 90 standard (or even
better, the Fortran 2018 one) is not even an option (yes, I?m
looking at you FORTRAN 77 and your incomprehensible goto, error-
prone common, artithmetic if and what not).
Best wishes, and happy switching from Python to Fortran 77! || |
Johann "Myrkraverk" Oskarsson <johann@myrkraverk.invalid> schrieb:
Best wishes, and happy switching from Python to Fortran 77!
Fortran 77 makes little sense, modern Fortran variants (Fortran
90+) are available with free compilers and offer much more comfort
and safety.
Thomas Koenig <tkoenig@NetCologne.De> hat geschrieben:
|-------------------------------------------------------------------| >|"Johann "Myrkraverk" Oskarsson <johann@myrkraverk.invalid> schrieb:|
| |
Best wishes, and happy switching from Python to Fortran 77! || | >|Fortran 77 makes little sense, modern Fortran variants (Fortran |
|90+) are available with free compilers and offer much more comfort |
|and safety." | >|-------------------------------------------------------------------|
Are new versions of Fortran still much slower than FORTRAN 77?
Ada is better for safety.
Thomas Koenig wrote:
Johann "Myrkraverk" Oskarsson <johann@myrkraverk.invalid> schrieb:
Best wishes, and happy switching from Python to Fortran 77!
Fortran 77 makes little sense, modern Fortran variants (Fortran
90+) are available with free compilers and offer much more comfort
and safety.
Recall that the modern bits of modern Fortran might well lead a student
to leap to use of MATINV, when MATINV should not be used. Etc..
Students need to think in detail about what the computations in linear algebra are doing.
Fortran 77 makes little sense, modern Fortran variants (Fortran 90+)
are available with free compilers and offer much more comfort and
safety.
On Sun, 6 Sep 2026 15:32:53 -0000 (UTC), Thomas Koenig wrote:
Fortran 77 makes little sense, modern Fortran variants (Fortran 90+)
are available with free compilers and offer much more comfort and
safety.
Python offers custom operator overloads, so you can write actual
operator expressions for addition, dot product etc -- closer in
appearance to the actual maths -- instead of parenthesis-ridden
function calls.
On Sun, 6 Sep 2026 15:32:53 -0000 (UTC), Thomas Koenig wrote:
Fortran 77 makes little sense, modern Fortran variants (Fortran 90+)
are available with free compilers and offer much more comfort and
safety.
Python offers custom operator overloads, so you can write actual
operator expressions for addition, dot product etc -- closer in
appearance to the actual maths -- instead of parenthesis-ridden
function calls.
On Sun, 6 Sep 2026 15:32:53 -0000 (UTC), Thomas Koenig wrote:
Fortran 77 makes little sense, modern Fortran variants (Fortran 90+)
are available with free compilers and offer much more comfort and
safety.
Python offers custom operator overloads, so you can write actual
operator expressions for addition, dot product etc -- closer in
appearance to the actual maths -- instead of parenthesis-ridden
function calls.
On Sun, 6 Sep 2026 22:00:39 -0000 (UTC), Lawrence D?Oliveiro wrote:
On Sun, 6 Sep 2026 15:32:53 -0000 (UTC), Thomas Koenig wrote:
Fortran 77 makes little sense, modern Fortran variants (Fortran 90+)
are available with free compilers and offer much more comfort and
safety.
Python offers custom operator overloads, so you can write actual
operator expressions for addition, dot product etc -- closer in
appearance to the actual maths -- instead of parenthesis-ridden
function calls.
Can we assume you know little to nothing about modern
Fortran? One can write custom operator overloads in
Fortran. Here's a Cartesian point with a translation
and scaling operators.
On Sun, 6 Sep 2026 22:00:39 -0000 (UTC), Lawrence D?Oliveiro wrote:
On Sun, 6 Sep 2026 15:32:53 -0000 (UTC), Thomas Koenig wrote:
Fortran 77 makes little sense, modern Fortran variants (Fortran
90+) are available with free compilers and offer much more comfort
and safety.
Python offers custom operator overloads, so you can write actual
operator expressions for addition, dot product etc -- closer in
appearance to the actual maths -- instead of parenthesis-ridden
function calls.
Can we assume you know little to nothing about modern Fortran? One
can write custom operator overloads in Fortran.
On Mon, 7 Sep 2026 04:41:38 -0000 (UTC), Steven G. Kargl wrote:
On Sun, 6 Sep 2026 22:00:39 -0000 (UTC), Lawrence D?Oliveiro wrote:
On Sun, 6 Sep 2026 15:32:53 -0000 (UTC), Thomas Koenig wrote:
Fortran 77 makes little sense, modern Fortran variants (Fortran
90+) are available with free compilers and offer much more comfort
and safety.
Python offers custom operator overloads, so you can write actual
operator expressions for addition, dot product etc -- closer in
appearance to the actual maths -- instead of parenthesis-ridden
function calls.
Can we assume you know little to nothing about modern Fortran? One
can write custom operator overloads in Fortran.
Something else I can do in Python is write things that look a lot like
new custom operators. E.g. a cross product between two 3D vectors
could be written (with a suitable definition of the ?cross? property)
as
v1 .cross* v2
without unnecessary parentheses.
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 8 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 163:20:04 |
| Calls: | 220 |
| Files: | 21,513 |
| Messages: | 83,832 |