# Language enhancement

**URL:** https://fortran-lang.discourse.group/c/language-enhancement/13.md

[Latest](https://fortran-lang.discourse.group/latest.md) · [Categories](https://fortran-lang.discourse.group/categories.md)

---

## [About the Language enhancement category](https://fortran-lang.discourse.group/t/about-the-language-enhancement-category/2238)

<div class="topic-metadata">

**Author:** [@certik](https://fortran-lang.discourse.group/u/certik)\
**Replies:** 0

</div>

To discuss new features to the Fortran language. Once an idea is more developed, one will submit it to the Fortran proposals repository: GitHub - j3-fortran/fortran\_proposals: Proposals for the Fortran Standard Committ…

---

## [Japanese Subgroup GENERIC proposal](https://fortran-lang.discourse.group/t/japanese-subgroup-generic-proposal/6539)

<div class="topic-metadata">

**Author:** [@nshaffer](https://fortran-lang.discourse.group/u/nshaffer)\
**Replies:** 128\
**Last updated:** [September 28, 2026, 12:52pm UTC](https://fortran-lang.discourse.group/t/japanese-subgroup-generic-proposal/6539 "2026-09-28T12:52:37Z")

</div>

I keep tabs on the J3 site, but am not in the habit of checking WG5. I was interested to see the Japanese subgroup has proposed a facility for generic programming. See document N2217 at https://wg5-fortran.org/. To me i…

---

## [Missing SinCos() in Fortran](https://fortran-lang.discourse.group/t/missing-sincos-in-fortran/11103)

<div class="topic-metadata">

**Author:** [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Replies:** 13\
**Last updated:** [September 25, 2026, 5:52pm UTC](https://fortran-lang.discourse.group/t/missing-sincos-in-fortran/11103 "2026-09-25T17:52:14Z")

</div>

In the ongoing quadpack discussion, this line of code was posted: I have a general question about this common situation where both sin() and cos() are computed with the same arguments. This occurs fairly often in signa…

---

## [Pass a scalar actual argument into an array dummy argument](https://fortran-lang.discourse.group/t/pass-a-scalar-actual-argument-into-an-array-dummy-argument/11100)

<div class="topic-metadata">

**Author:** [@Machalot](https://fortran-lang.discourse.group/u/Machalot)\
**Replies:** 34\
**Last updated:** [September 17, 2026, 8:23pm UTC](https://fortran-lang.discourse.group/t/pass-a-scalar-actual-argument-into-an-array-dummy-argument/11100 "2026-09-17T20:23:51Z")

</div>

I know it’s non-standard pass a scalar variable into a procedure argument where an array is expected, as discussed in other threads on this site. (But it is acceptable to do the reverse, to pass a single array element i…

---

## [Memory mapped files in Fortran?](https://fortran-lang.discourse.group/t/memory-mapped-files-in-fortran/7178)

<div class="topic-metadata">

**Author:** [@PierU](https://fortran-lang.discourse.group/u/PierU)\
**Replies:** 24\
**Last updated:** [August 27, 2026, 7:50pm UTC](https://fortran-lang.discourse.group/t/memory-mapped-files-in-fortran/7178 "2026-08-27T19:50:30Z")

</div>

C has memory mapped files. Among different possible usages they allow: accessing the content of a file as if it was an array in memory allocating very large arrays beyond the RAM+swap size: the content is basically on …

---

## [Can we reinstate EQUIVALENCE?](https://fortran-lang.discourse.group/t/can-we-reinstate-equivalence/10913)

<div class="topic-metadata">

**Author:** [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Replies:** 54\
**Last updated:** [June 8, 2026, 4:25pm UTC](https://fortran-lang.discourse.group/t/can-we-reinstate-equivalence/10913 "2026-06-08T16:25:52Z")

</div>

We have a code base of tens of millions of lines. Just over 70% of the packages contain EQUIVALENCE statements. The uses we identified are: Organising data for communication between processes. One package used in fi…

---

## [MOVE\_ALLOC extended to non-allocatable derived types containing allocatable components](https://fortran-lang.discourse.group/t/move-alloc-extended-to-non-allocatable-derived-types-containing-allocatable-components/10922)

<div class="topic-metadata">

**Author:** [@TimBellerby](https://fortran-lang.discourse.group/u/TimBellerby)\
**Replies:** 22\
**Last updated:** [May 27, 2026, 1:56pm UTC](https://fortran-lang.discourse.group/t/move-alloc-extended-to-non-allocatable-derived-types-containing-allocatable-components/10922 "2026-05-27T13:56:18Z")

</div>

Not sure if this has already been suggested. I can see some merit in generalising this intrinsic to accept derived types containing allocatable components, thus providing broader support for the move semantics becoming p…

---

## [Generics in Fortran 202Y: Petition to WG5?](https://fortran-lang.discourse.group/t/generics-in-fortran-202y-petition-to-wg5/8255)

<div class="topic-metadata">

**Author:** [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Replies:** 141\
**Last updated:** [April 23, 2026, 5:07pm UTC](https://fortran-lang.discourse.group/t/generics-in-fortran-202y-petition-to-wg5/8255 "2026-04-23T17:07:19Z")

</div>

To those interested in enhanced Generics in Fortran: You may know “J3” (INCITS), in essence, is a “contractor” to WG5, the body toward ISO IEC standard for Fortran. The “contract” to “J3” is effectively the technical…

---

## [Specifying command line arguments via the PROGRAM statement](https://fortran-lang.discourse.group/t/specifying-command-line-arguments-via-the-program-statement/2982)

<div class="topic-metadata">

**Author:** [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Replies:** 29\
**Last updated:** [January 12, 2026, 12:31pm UTC](https://fortran-lang.discourse.group/t/specifying-command-line-arguments-via-the-program-statement/2982 "2026-01-12T12:31:05Z")

</div>

proposal for the PROGRAM statement to have arguments that allow for an automatic interface to the OS command line (perhaps optionally a GUI interface as well): If the PROGRAM statement took arguments like a procedure an…

---

## [Prefix keyword to fix namespace](https://fortran-lang.discourse.group/t/prefix-keyword-to-fix-namespace/9607)

<div class="topic-metadata">

**Author:** [@weixing1531](https://fortran-lang.discourse.group/u/weixing1531)\
**Replies:** 20\
**Last updated:** [April 27, 2025, 10:49pm UTC](https://fortran-lang.discourse.group/t/prefix-keyword-to-fix-namespace/9607 "2025-04-27T22:49:07Z")

</div>

I know =\> can fix it use modA,only:sub1 use,prefix::modB call sub1() call modB.sub1() Like Python import modB modB.sub1

---

## [Why do we need TYPEOF?](https://fortran-lang.discourse.group/t/why-do-we-need-typeof/9454)

<div class="topic-metadata">

**Author:** [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Replies:** 72\
**Last updated:** [April 3, 2025, 7:03pm UTC](https://fortran-lang.discourse.group/t/why-do-we-need-typeof/9454 "2025-04-03T19:03:02Z")

</div>

When, at last, we have generics I have seen several posts which use the keyword TYPEOF to specify that the type of one argument should be the same as another. Is it necessary to have a new keyword? If x is a variable, …

---

## [Building a Fortran compiler in pure Fortran (Mega thread)](https://fortran-lang.discourse.group/t/building-a-fortran-compiler-in-pure-fortran-mega-thread/4785)

<div class="topic-metadata">

**Author:** [@Aurelius\_Nero](https://fortran-lang.discourse.group/u/Aurelius_Nero)\
**Replies:** 20\
**Last updated:** [February 19, 2025, 10:02pm UTC](https://fortran-lang.discourse.group/t/building-a-fortran-compiler-in-pure-fortran-mega-thread/4785 "2025-02-19T22:02:37Z")

</div>

This thread is to continue the discussion from the following thread : Other Links : Please feel free to participate. @RonShepard How would this affect interoperability with libraries and p…

---

## [Un-typed arguments](https://fortran-lang.discourse.group/t/un-typed-arguments/8978)

<div class="topic-metadata">

**Author:** [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Replies:** 1\
**Last updated:** [December 16, 2024, 4:11pm UTC](https://fortran-lang.discourse.group/t/un-typed-arguments/8978 "2024-12-16T16:11:57Z")

</div>

This proposal follows on from the discussion of generics. There are situations where the type, kind and shape of an argument may be irrelevant. For example, when calling a wrapper for an mpi routine which sends a packe…

---

## [Ownership for Fortran pointers](https://fortran-lang.discourse.group/t/ownership-for-fortran-pointers/8084)

<div class="topic-metadata">

**Author:** [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Replies:** 57\
**Last updated:** [November 21, 2024, 6:54pm UTC](https://fortran-lang.discourse.group/t/ownership-for-fortran-pointers/8084 "2024-11-21T18:54:28Z")

</div>

For quite a long time I’ve being thinking if there could be a way of making usage of pointer a bit safer in Fortran. They offer many advantages but can be tricky if one is not careful about memory management. I have fou…

---

## [Syntax problem and basic principle](https://fortran-lang.discourse.group/t/syntax-problem-and-basic-principle/8788)

<div class="topic-metadata">

**Author:** [@Benobo](https://fortran-lang.discourse.group/u/Benobo)\
**Replies:** 3\
**Last updated:** [November 4, 2024, 3:21pm UTC](https://fortran-lang.discourse.group/t/syntax-problem-and-basic-principle/8788 "2024-11-04T15:21:50Z")

</div>

Hello my friends, I’m trying to translate a Fortran program into Xojo. This program is about finding all the roots of a polynomial “Algorithm 493: Zeros of a Real Polynomial”. I have two questions regarding certain va…

---

## [Automatic block between if and else/endif](https://fortran-lang.discourse.group/t/automatic-block-between-if-and-else-endif/8728)

<div class="topic-metadata">

**Author:** [@nja](https://fortran-lang.discourse.group/u/nja)\
**Replies:** 2\
**Last updated:** [October 17, 2024, 11:45am UTC](https://fortran-lang.discourse.group/t/automatic-block-between-if-and-else-endif/8728 "2024-10-17T11:45:33Z")

</div>

I often find myself writing: if (condition) then block integer :: some\_local\_variable ! Do something with some\_local\_variable only within this if scope end block ! From here some\_local\_variable is not availabl…

---

## [Line continuation without implicit assumptions](https://fortran-lang.discourse.group/t/line-continuation-without-implicit-assumptions/8450)

<div class="topic-metadata">

**Author:** [@aerosayan](https://fortran-lang.discourse.group/u/aerosayan)\
**Replies:** 13\
**Last updated:** [August 24, 2024, 4:08pm UTC](https://fortran-lang.discourse.group/t/line-continuation-without-implicit-assumptions/8450 "2024-08-24T16:08:04Z")

</div>

Hello everyone, Line continuations without & would be extremely useful for many things in Fortran. Declaring arrays, and calling large methods. Declaring associate blocks, without accidental mistakes. And many …

---

## [KART: a recommended design element toward Generics in Fortran](https://fortran-lang.discourse.group/t/kart-a-recommended-design-element-toward-generics-in-fortran/8431)

<div class="topic-metadata">

**Author:** [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Replies:** 9\
**Last updated:** [August 15, 2024, 10:08am UTC](https://fortran-lang.discourse.group/t/kart-a-recommended-design-element-toward-generics-in-fortran/8431 "2024-08-15T10:08:20Z")

</div>

Introduction Enhanced facility toward Generics in Fortran is a major focus of Fortran 202Y standard revision with several items on the worklist, In response to Community feedback and also push from another national bod…

---

## [Allow newunit to allocate an integer variable](https://fortran-lang.discourse.group/t/allow-newunit-to-allocate-an-integer-variable/8451)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 9\
**Last updated:** [August 11, 2024, 6:39pm UTC](https://fortran-lang.discourse.group/t/allow-newunit-to-allocate-an-integer-variable/8451 "2024-08-11T18:39:59Z")

</div>

Could the newunit specifier of the open statement be extended so that if an allocatable integer variable that has not been allocated is passed, it is allocated by the open statement? For example, in the code below, I wou…

---

## [Should elemental functions accept vector arguments?](https://fortran-lang.discourse.group/t/should-elemental-functions-accept-vector-arguments/8430)

<div class="topic-metadata">

**Author:** [@aerosayan](https://fortran-lang.discourse.group/u/aerosayan)\
**Replies:** 3\
**Last updated:** [August 4, 2024, 8:14pm UTC](https://fortran-lang.discourse.group/t/should-elemental-functions-accept-vector-arguments/8430 "2024-08-04T20:14:55Z")

</div>

Hi everyone, Elemental functions seem to only accept scalar arguments, and with good reason. However, what do you think of also supporting vector arguments? In many cases, we have large arrays of vector data that coul…

---

## [Should associate span across multiple lines?](https://fortran-lang.discourse.group/t/should-associate-span-across-multiple-lines/8436)

<div class="topic-metadata">

**Author:** [@aerosayan](https://fortran-lang.discourse.group/u/aerosayan)\
**Replies:** 2\
**Last updated:** [August 5, 2024, 11:18am UTC](https://fortran-lang.discourse.group/t/should-associate-span-across-multiple-lines/8436 "2024-08-05T11:18:44Z")

</div>

Limiting associate to a single line, is not good for readability. associate (rho =\> csv(1), urho =\> csv(2), vrho =\> csv(3), wrho =\> csv(4), erho =\> csv(5)) ! code end associate We can use & to split this into multi…

---

## [Universal good practice style guide for fortran](https://fortran-lang.discourse.group/t/universal-good-practice-style-guide-for-fortran/4971)

<div class="topic-metadata">

**Author:** [@d.mentock](https://fortran-lang.discourse.group/u/d.mentock)\
**Replies:** 21\
**Last updated:** [August 2, 2024, 7:34am UTC](https://fortran-lang.discourse.group/t/universal-good-practice-style-guide-for-fortran/4971 "2024-08-02T07:34:33Z")

</div>

In the context of our development of the fortran-based crystal plastisity simulation software DAMASK, we are currently developing a pre-commit hook with the pre-commit utility to enforce that our style guidelines are pro…

---

## [Some other use of \`{}\`](https://fortran-lang.discourse.group/t/some-other-use-of/8372)

<div class="topic-metadata">

**Author:** [@AniruddhaDas](https://fortran-lang.discourse.group/u/AniruddhaDas)\
**Replies:** 9\
**Last updated:** [July 31, 2024, 8:43am UTC](https://fortran-lang.discourse.group/t/some-other-use-of/8372 "2024-07-31T08:43:36Z")

</div>

These are some ideas I collected for future use of {} in fortran from the forum itself after the change in templates feature. Python inspired f-string: As it was shown in an another thread by @certik. I thought maybe …

---

## [Add a specifier to namelist read that requires all members to be read](https://fortran-lang.discourse.group/t/add-a-specifier-to-namelist-read-that-requires-all-members-to-be-read/7578)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 24\
**Last updated:** [July 29, 2024, 5:24pm UTC](https://fortran-lang.discourse.group/t/add-a-specifier-to-namelist-read-that-requires-all-members-to-be-read/7578 "2024-07-29T17:24:09Z")

</div>

A namelist READ will read the members present in the namelist file or string and leave the other members unchanged. If those members were not set before, they may be inadvertently used before being set. For example, the …

---

## ["real" type of a calculation with mixed precisions](https://fortran-lang.discourse.group/t/real-type-of-a-calculation-with-mixed-precisions/8395)

<div class="topic-metadata">

**Author:** [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Replies:** 10\
**Last updated:** [July 29, 2024, 4:59pm UTC](https://fortran-lang.discourse.group/t/real-type-of-a-calculation-with-mixed-precisions/8395 "2024-07-29T16:59:02Z")

</div>

The result of a calculation involving mixed real precisions should use the highest precision: program precisions use iso\_fortran env: only: sp =\> real32, dp =\> real64 implicit none real(sp) :: x = 1.23 real(dp)…

---

## [Why are parens required around format strings?](https://fortran-lang.discourse.group/t/why-are-parens-required-around-format-strings/8323)

<div class="topic-metadata">

**Author:** [@Machalot](https://fortran-lang.discourse.group/u/Machalot)\
**Replies:** 68\
**Last updated:** [July 24, 2024, 6:22pm UTC](https://fortran-lang.discourse.group/t/why-are-parens-required-around-format-strings/8323 "2024-07-24T18:22:31Z")

</div>

While reading a thread about the G format descriptor, I found this comment: Can someone explain why this would be hard to change? Usually the concern is backward compatibility. But if the surrounding parentheses were…

---

## [Definition of 'significand'](https://fortran-lang.discourse.group/t/definition-of-significand/8109)

<div class="topic-metadata">

**Author:** [@Harper](https://fortran-lang.discourse.group/u/Harper)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 12:25am UTC](https://fortran-lang.discourse.group/t/definition-of-significand/8109 "2024-05-30T00:25:55Z")

</div>

The F2023 definition of significand means that a real literal constant may have no significand, because 7.4.3.2 contains both R715 and Note 3. R715 significand is digit-string . \[ digit-string \] or . di…

---

## [Automatic Differentiation Built Into LFortran](https://fortran-lang.discourse.group/t/automatic-differentiation-built-into-lfortran/3198)

<div class="topic-metadata">

**Author:** [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Replies:** 27\
**Last updated:** [April 9, 2024, 10:24pm UTC](https://fortran-lang.discourse.group/t/automatic-differentiation-built-into-lfortran/3198 "2024-04-09T22:24:29Z")

</div>

@certik, @yizhang and everyone\_else\_interested: I think it would be of immense benefit and forward-thinking to have automatic differentiation built into the LFortran compiler as a first class citizen. Based on: its…

---

## [Namelist attribute for use in variable declaration](https://fortran-lang.discourse.group/t/namelist-attribute-for-use-in-variable-declaration/7739)

<div class="topic-metadata">

**Author:** [@Machalot](https://fortran-lang.discourse.group/u/Machalot)\
**Replies:** 21\
**Last updated:** [April 3, 2024, 3:02am UTC](https://fortran-lang.discourse.group/t/namelist-attribute-for-use-in-variable-declaration/7739 "2024-04-03T03:02:18Z")

</div>

To avoid the need for a namelist variable to appear twice, first in a declaration and then in a namelist group definition, would it make sense to add a namelist attribute? So this: real :: good, push, it namelist /snp/…

---

## [Attribute for "pure" procedures that do I/O](https://fortran-lang.discourse.group/t/attribute-for-pure-procedures-that-do-i-o/2694)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 37\
**Last updated:** [March 28, 2024, 3:16pm UTC](https://fortran-lang.discourse.group/t/attribute-for-pure-procedures-that-do-i-o/2694 "2024-03-28T15:16:28Z")

</div>

Most subroutines I write that are not PURE do external I/O. Would it be useful for Fortran to have an attribute for procedures that do external I/O but are otherwise pure, maybe pure\_io? This would clarify to the reader …

[Next page](https://fortran-lang.discourse.group/c/language-enhancement/13.md?page=1)
