Re: Blog: Is Fortran better than Python for teaching the basics of numerical linear algebra?
Lawrence D’Oliveiro <[email protected]>
| Newsgroups | sci.math,comp.lang.fortran,comp.lang.python |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
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.