[J3] C TS 18661
Holcomb, Katherine A (kah3f)
kah3f at virginia.edu
Thu Jan 31 11:05:57 EST 2019
Hello, I joined the J3 list fairly recently as an observer. I am a
Fortran user and instructor (more of the latter these days). I have
taught Fortran, C++, and Python to science and engineering students for
several years. In the last few years I've taught Fortran and C++ in
parallel so have been able to note the similarities and differences more
than I might have otherwise.
I would agree about the perceived stampede to Python. Students are very
resistant to learning *any* compiled language. When in one
instructional context I made them do compiled language for a few days
after a week of Python, there was much complaining. Python has also
become extremely popular for applications such as machine learning
(mostly in the form of bindings to C++ code written by computer scientists).
I must also confess that the C++ I teach is generally what I call
"decorated C." We don't use much of the OOP machinery until late in the
class. The students generally need to learn the basics, and most of
them struggle with the concepts behind OOP. They tend to think in
procedural terms. The movement from C to C++ in science has been pretty
slow. As is true for Fortran, there is a lot of legacy code. But for
example, the physics department here teaches a computational physics
course using C. I'm not sure the instructor knows C++. They've even
been resistant to using Python. Some newer bioinformatics code is
written in C++ but often that's because CS students or graduates are
hired to do it.
As to the proposed intrinsics, I would support expm1 and logp1. These
expressions are pretty ubiquitous in equations in many math-heavy
fields. I would really like trig functions that accept degrees rather
than radians or would make conversion straightforward. A lot of
geoscience data coordinates are in degrees and when I'd assign a project
from such data, I marked many codes wrong due to forgetting to convert.
I guess I'm agnostic about sincos. I'm not sure the typical scientific
programmer would understand the motivation or remember it exists, but if
it would be helpful to those who do then great.
I was very interested in the survey on Fortran usage posted. I have my
own wish list for Fortran but won't clutter this email with it.
On 1/31/19 12:19 AM, Bill Long via J3 wrote:
>> On Jan 30, 2019, at 7:08 PM, Van Snyder via J3 <j3 at mailman.j3-fortran.org> wrote:
>>
>> On Wed, 2019-01-30 at 15:44 -0500, Steve Lionel via J3 wrote:
>>> Please don't think that I am objecting - I have no position on these new
>>> suggestions at this time. I was just pointing out that they would not be
>>> "standardizing existing practice".
>> I pointed out in my original post in this thread that expm1 and logp1
>> (and sinpi instead of sind, etc) are in the C TS 18661. I further
>> pointed out that Fortran appearing to lag behind C for scientific and
>> engineering applications is not good advertising.
>>
> Is C really used for new scientific and engineering applications these days? I had thought that the main non-Fortran languages for those domains were now C++ (with a negative growth rate) and Python (with a definitely positive growth rate).
>
> Also, if these routines are part of the required math library for C, can’t Fortran programmers just call them directly using bind(c) interfaces? !6.9 already has 199 subclauses. It seems that adding yet more intrinsics should have a fairly high use case threshold for justification.
>
> Cheers,
> Bill
>
>
> Bill Long longb at cray.com
> Principal Engineer, Fortran Technical Support & voice: 651-605-9024
> Bioinformatics Software Development fax: 651-605-9143
> Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
>
>
--
Katherine Holcomb
kholcomb at virginia.edu 434-982-5948
Advanced Research Computing Services
University of Virginia
Charlottesville, Virginia
More information about the J3
mailing list