# Language enhancement

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

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

**Page:** 3

---

## [Multiple parallelization layers vs the agnosticism of coarrays: suggestions for improvement](https://fortran-lang.discourse.group/t/multiple-parallelization-layers-vs-the-agnosticism-of-coarrays-suggestions-for-improvement/5238)

<div class="topic-metadata">

**Author:** [@adenchfi](https://fortran-lang.discourse.group/u/adenchfi)\
**Replies:** 0\
**Last updated:** [February 19, 2023, 11:42pm UTC](https://fortran-lang.discourse.group/t/multiple-parallelization-layers-vs-the-agnosticism-of-coarrays-suggestions-for-improvement/5238 "2023-02-19T23:42:57Z")

</div>

How can Fortran take advantage of the fact that communication is faster intra-node (shared memory) than inter-node? Coarrays are reducing the need on say MPI, but current implementations seem to not be able to act like h…

---

## [Is there any StringBuilder like utility in stdlib, or should I build one?](https://fortran-lang.discourse.group/t/is-there-any-stringbuilder-like-utility-in-stdlib-or-should-i-build-one/5194)

<div class="topic-metadata">

**Author:** [@cyrilgandon](https://fortran-lang.discourse.group/u/cyrilgandon)\
**Replies:** 4\
**Last updated:** [February 13, 2023, 6:44pm UTC](https://fortran-lang.discourse.group/t/is-there-any-stringbuilder-like-utility-in-stdlib-or-should-i-build-one/5194 "2023-02-13T18:44:28Z")

</div>

I am using stdlib\_string\_type and stdlib\_stringlist\_type a lot in my codebase. I wrote a kind of preprocessor in fortran, to write more fortan! But it’s pretty slow and the core of the project is to append strings with…

---

## [Suggestion: FINDLOC tolerance](https://fortran-lang.discourse.group/t/suggestion-findloc-tolerance/5131)

<div class="topic-metadata">

**Author:** [@adenchfi](https://fortran-lang.discourse.group/u/adenchfi)\
**Replies:** 15\
**Last updated:** [February 7, 2023, 7:56pm UTC](https://fortran-lang.discourse.group/t/suggestion-findloc-tolerance/5131 "2023-02-07T19:56:50Z")

</div>

A simple suggestion. Include an optional tolerance parameter for FINDLOC, such that you can apply it to real arrays without worry of floating point behavior messing things up. Expected behavior when multiple values fall…

---

## [Allow objects of abstract type](https://fortran-lang.discourse.group/t/allow-objects-of-abstract-type/2315)

<div class="topic-metadata">

**Author:** [@vsnyder](https://fortran-lang.discourse.group/u/vsnyder)\
**Replies:** 2\
**Last updated:** [January 16, 2023, 11:34pm UTC](https://fortran-lang.discourse.group/t/allow-objects-of-abstract-type/2315 "2023-01-16T23:34:43Z")

</div>

Declaring or creating an object of abstract type is not permitted. The rationale is that one might invoke what appears to be a type-bound procedure that isn’t actually available. I have a code for nonlinear least square…

---

## [Error: The leftmost part-ref in a data-ref cannot be a function reference](https://fortran-lang.discourse.group/t/error-the-leftmost-part-ref-in-a-data-ref-cannot-be-a-function-reference/4990)

<div class="topic-metadata">

**Author:** [@gronki](https://fortran-lang.discourse.group/u/gronki)\
**Replies:** 13\
**Last updated:** [January 10, 2023, 4:10pm UTC](https://fortran-lang.discourse.group/t/error-the-leftmost-part-ref-in-a-data-ref-cannot-be-a-function-reference/4990 "2023-01-10T16:10:51Z")

</div>

So in Fortran Discord (highly recommend, cool place), we were discussing with @Aurelius\_Nero what is exactly the reason the chain() % function() % calls(), which actually are the basis of large part of modern programming…

---

## [Bullet points in the standard](https://fortran-lang.discourse.group/t/bullet-points-in-the-standard/4915)

<div class="topic-metadata">

**Author:** [@Harper](https://fortran-lang.discourse.group/u/Harper)\
**Replies:** 2\
**Last updated:** [December 16, 2022, 1:34am UTC](https://fortran-lang.discourse.group/t/bullet-points-in-the-standard/4915 "2022-12-16T01:34:56Z")

</div>

When writing something to send to comp.lang.fortran I found myself having to refer to f2018 A.2 para 1 bullet points 19,20. (I hope I didn’t miscount. The topic was finalization.) Years ago I was in a meeting discussin…

---

## [Functional Programming Addition to stdlib](https://fortran-lang.discourse.group/t/functional-programming-addition-to-stdlib/3430)

<div class="topic-metadata">

**Author:** [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Replies:** 11\
**Last updated:** [October 14, 2022, 10:57am UTC](https://fortran-lang.discourse.group/t/functional-programming-addition-to-stdlib/3430 "2022-10-14T10:57:47Z")

</div>

What are your opinions of adding @milancurcic 's Functional-Fortran library to stdlib? As a functional programming fan and given its benefits in expressing ideas concisely, I am all for it. I think it would be an excelle…

---

## [Improvement to 'expecting endif'](https://fortran-lang.discourse.group/t/improvement-to-expecting-endif/4080)

<div class="topic-metadata">

**Author:** [@juhalappi](https://fortran-lang.discourse.group/u/juhalappi)\
**Replies:** 19\
**Last updated:** [July 30, 2022, 10:20am UTC](https://fortran-lang.discourse.group/t/improvement-to-expecting-endif/4080 "2022-07-30T10:20:11Z")

</div>

I have written a precompiler which generates use statements and makes indentations. Recently I added the property that the if there are unproperly nested ifthens or dos, the precompiler tells on what line ifthen or do is…

---

## [Array subscripts in Fortran202x](https://fortran-lang.discourse.group/t/array-subscripts-in-fortran202x/3876)

<div class="topic-metadata">

**Author:** [@han190](https://fortran-lang.discourse.group/u/han190)\
**Replies:** 0\
**Last updated:** [June 30, 2022, 10:08pm UTC](https://fortran-lang.discourse.group/t/array-subscripts-in-fortran202x/3876 "2022-06-30T22:08:14Z")

</div>

In section 8 of the new features of Fortran 202x, array subscripts could be written as integer :: idx(2) idx = \[4, 7\] arr(@idx) ! Equivalent to arr(4, 7) I have no idea compiler-wise how hard it is to implement, but wi…

---

## [Initialization constant](https://fortran-lang.discourse.group/t/initialization-constant/3818)

<div class="topic-metadata">

**Author:** [@egio](https://fortran-lang.discourse.group/u/egio)\
**Replies:** 3\
**Last updated:** [June 23, 2022, 9:17am UTC](https://fortran-lang.discourse.group/t/initialization-constant/3818 "2022-06-23T09:17:44Z")

</div>

I don’t know if it has been already proposed. Basically if I have a procedure that has an assumed shape array as an argument, I can define the size of an additional array using the information that I can get from the arg…

---

## [Have a fixed-size attribute for derived type arguments](https://fortran-lang.discourse.group/t/have-a-fixed-size-attribute-for-derived-type-arguments/3585)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 1\
**Last updated:** [May 29, 2022, 9:38am UTC](https://fortran-lang.discourse.group/t/have-a-fixed-size-attribute-for-derived-type-arguments/3585 "2022-05-29T09:38:03Z")

</div>

In the thread Type definition for collecting data, how to ensure that allocatable components of a derived type are dimensioned consistently was discussed, which gave me an idea It is convenient that you can allocate an …

---

## [Flaw with typed enumerators in F202X](https://fortran-lang.discourse.group/t/flaw-with-typed-enumerators-in-f202x/3429)

<div class="topic-metadata">

**Author:** [@zedthree](https://fortran-lang.discourse.group/u/zedthree)\
**Replies:** 23\
**Last updated:** [May 19, 2022, 2:07pm UTC](https://fortran-lang.discourse.group/t/flaw-with-typed-enumerators-in-f202x/3429 "2022-05-19T14:07:46Z")

</div>

Is the specification for the new enumerator type fixed for F202X? I’ve just been reading the proposed spec and while it’s missing a few features that would be incredibly useful (user-defined values, IO, character convers…

---

## [Automatic generic interface from multiple modules](https://fortran-lang.discourse.group/t/automatic-generic-interface-from-multiple-modules/3459)

<div class="topic-metadata">

**Author:** [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Replies:** 0\
**Last updated:** [May 14, 2022, 8:43pm UTC](https://fortran-lang.discourse.group/t/automatic-generic-interface-from-multiple-modules/3459 "2022-05-14T20:43:16Z")

</div>

Wondering if anyone else things something along the lines of the following language enhancment proposal would be reasonable/desirable, or if preprocessing or proposed templating features would make it unneccessary … You…

---

## [For whom Fortran? For what?](https://fortran-lang.discourse.group/t/for-whom-fortran-for-what/3378)

<div class="topic-metadata">

**Author:** [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Replies:** 19\
**Last updated:** [May 6, 2022, 4:43pm UTC](https://fortran-lang.discourse.group/t/for-whom-fortran-for-what/3378 "2022-05-06T16:43:07Z")

</div>

As the discussions toward new ideas and features for Fortran 202Y standard revision have commenced and interest is picking up on improving the communication and education on modern Fortran and its capabilities, it will b…

---

## [New syntax to disallow narrowing conversion as in C++](https://fortran-lang.discourse.group/t/new-syntax-to-disallow-narrowing-conversion-as-in-c/3359)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 7\
**Last updated:** [May 3, 2022, 5:01pm UTC](https://fortran-lang.discourse.group/t/new-syntax-to-disallow-narrowing-conversion-as-in-c/3359 "2022-05-03T17:01:04Z")

</div>

C++ now has a syntax to disallow a narrowing conversion. Compiling #include \<iostream\> int main() { const int i = {2.1}; // invalid const int j = 2.1; // legal std::cout \<\< "i =" \<\< i; } with g++ gives narrow.cp…

---

## [Prospective/desirable characteristics of future fortran standards](https://fortran-lang.discourse.group/t/prospective-desirable-characteristics-of-future-fortran-standards/3339)

<div class="topic-metadata">

**Author:** [@conradoat](https://fortran-lang.discourse.group/u/conradoat)\
**Replies:** 3\
**Last updated:** [April 28, 2022, 10:02pm UTC](https://fortran-lang.discourse.group/t/prospective-desirable-characteristics-of-future-fortran-standards/3339 "2022-04-28T22:02:06Z")

</div>

Hi all, Let me open a thread where we can propose features for fortran. We can also try to think why is fortran perceived as archaic.

---

## [Out-of-core, Checkpointing, Fault Tolerance](https://fortran-lang.discourse.group/t/out-of-core-checkpointing-fault-tolerance/3047)

<div class="topic-metadata">

**Author:** [@themos](https://fortran-lang.discourse.group/u/themos)\
**Replies:** 6\
**Last updated:** [March 26, 2022, 12:43pm UTC](https://fortran-lang.discourse.group/t/out-of-core-checkpointing-fault-tolerance/3047 "2022-03-26T12:43:15Z")

</div>

The recent emphasis on desirable features for future Fortran has been on generics and tidy-ups of existing syntax with new semantics. Fortran would be playing catch-up to C++ if we followed that route and is already quit…

---

## [Array broadcasting in expressions](https://fortran-lang.discourse.group/t/array-broadcasting-in-expressions/2976)

<div class="topic-metadata">

**Author:** [@egio](https://fortran-lang.discourse.group/u/egio)\
**Replies:** 20\
**Last updated:** [March 19, 2022, 7:19pm UTC](https://fortran-lang.discourse.group/t/array-broadcasting-in-expressions/2976 "2022-03-19T19:19:42Z")

</div>

I have placed a similar issue in fortran proposal (Array broadcasting in expressions · Issue #252 · j3-fortran/fortran\_proposals · GitHub) before reading that it is better to place it here in advance to have more comment…

---

## [Immutable declaration](https://fortran-lang.discourse.group/t/immutable-declaration/2923)

<div class="topic-metadata">

**Author:** [@NormanKirkby](https://fortran-lang.discourse.group/u/NormanKirkby)\
**Replies:** 18\
**Last updated:** [March 14, 2022, 2:03pm UTC](https://fortran-lang.discourse.group/t/immutable-declaration/2923 "2022-03-14T14:03:40Z")

</div>

I wonder if it would be useful to have a declaration of “immutable” by which I mean a variable of intrinsic or derived type that can be declared immutable so that once it is first given a value during execution it then b…

---

## [Allow TYPE IS to select multiple types](https://fortran-lang.discourse.group/t/allow-type-is-to-select-multiple-types/2855)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 11\
**Last updated:** [March 1, 2022, 9:37pm UTC](https://fortran-lang.discourse.group/t/allow-type-is-to-select-multiple-types/2855 "2022-03-01T21:37:26Z")

</div>

I suggest that a type is statement be allowed to select multiple types, so that the commented lines below are valid. subroutine twice(p) class(\*), intent(in out) :: p select type (p) type is (integer) p = 2\*p …

---

## [Allow math intrinsic functions to take integer arguments](https://fortran-lang.discourse.group/t/allow-math-intrinsic-functions-to-take-integer-arguments/2833)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 4\
**Last updated:** [February 21, 2022, 3:30pm UTC](https://fortran-lang.discourse.group/t/allow-math-intrinsic-functions-to-take-integer-arguments/2833 "2022-02-21T15:30:16Z")

</div>

In Julia, Matlab, R, and Python (after from math import sqrt, exp) you can write sqrt(2) or exp(2) and get the same result as for sqrt(2.0) and exp(2.0). Their default real is double precision. Currently the Fortran math…

---

## [Allow MOLD in ALLOCATE to have different type from variable allocated](https://fortran-lang.discourse.group/t/allow-mold-in-allocate-to-have-different-type-from-variable-allocated/2553)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 2\
**Last updated:** [January 9, 2022, 8:40pm UTC](https://fortran-lang.discourse.group/t/allow-mold-in-allocate-to-have-different-type-from-variable-allocated/2553 "2022-01-09T20:40:46Z")

</div>

Since one may want to allocate an array to have the same shape as an array of a different type, I suggest that Fortran allow mold to have a different type from the variable being allocated. In the code below, the line ma…

---

## [A need for a proposal for an enforced INTENT(IN)?](https://fortran-lang.discourse.group/t/a-need-for-a-proposal-for-an-enforced-intent-in/2380)

<div class="topic-metadata">

**Author:** [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Replies:** 14\
**Last updated:** [January 7, 2022, 1:50am UTC](https://fortran-lang.discourse.group/t/a-need-for-a-proposal-for-an-enforced-intent-in/2380 "2022-01-07T01:50:17Z")

</div>

The intent(out) attribute means that the value of the argument after invoking the procedure is entirely the result of executing that procedure. intent(in) is just literally indicating the intent of the programmer. As …

---

## [Accessing array elements and member variables/procedures of function results](https://fortran-lang.discourse.group/t/accessing-array-elements-and-member-variables-procedures-of-function-results/2414)

<div class="topic-metadata">

**Author:** [@veryreverie](https://fortran-lang.discourse.group/u/veryreverie)\
**Replies:** 2\
**Last updated:** [December 15, 2021, 3:10pm UTC](https://fortran-lang.discourse.group/t/accessing-array-elements-and-member-variables-procedures-of-function-results/2414 "2021-12-15T15:10:28Z")

</div>

Something that I’ve been thinking about for a while, and which came up again on Stack Overflow recently: I think it would be nice if it were possible to access array elements and class members of function results directl…

---

## [Structure constructors for derived type with private components](https://fortran-lang.discourse.group/t/structure-constructors-for-derived-type-with-private-components/2394)

<div class="topic-metadata">

**Author:** [@msz59](https://fortran-lang.discourse.group/u/msz59)\
**Replies:** 5\
**Last updated:** [December 13, 2021, 12:40am UTC](https://fortran-lang.discourse.group/t/structure-constructors-for-derived-type-with-private-components/2394 "2021-12-13T00:40:46Z")

</div>

If a derived type contains private components, it is impossible to use structure constructor in assignment. The standard requires that the constructor includes values for all components with the exception of those having…

---

## [An experimental standard](https://fortran-lang.discourse.group/t/an-experimental-standard/2381)

<div class="topic-metadata">

**Author:** [@fortran4r](https://fortran-lang.discourse.group/u/fortran4r)\
**Replies:** 1\
**Last updated:** [December 8, 2021, 7:32pm UTC](https://fortran-lang.discourse.group/t/an-experimental-standard/2381 "2021-12-08T19:32:19Z")

</div>

I was wondering if Fortran could have an experimental standard, similar to the C++ experimental std. The experimental standard would include the features not yet voted into the official standard. The experimental standar…

---

## [Indexing arrays by an array of logicals](https://fortran-lang.discourse.group/t/indexing-arrays-by-an-array-of-logicals/2264)

<div class="topic-metadata">

**Author:** [@zaikunzhang](https://fortran-lang.discourse.group/u/zaikunzhang)\
**Replies:** 19\
**Last updated:** [November 26, 2021, 9:21pm UTC](https://fortran-lang.discourse.group/t/indexing-arrays-by-an-array-of-logicals/2264 "2021-11-26T21:21:43Z")

</div>

Imagine that you have two arrays A and B of the same shape, and you would like to set A to 0 wherever B is positive. This can be done by where (B \> 0) A = 0 end where This is great, but in MATLAB, it can be done …

---

## [Getting a backtrace](https://fortran-lang.discourse.group/t/getting-a-backtrace/2332)

<div class="topic-metadata">

**Author:** [@vsnyder](https://fortran-lang.discourse.group/u/vsnyder)\
**Replies:** 3\
**Last updated:** [November 25, 2021, 4:06pm UTC](https://fortran-lang.discourse.group/t/getting-a-backtrace/2332 "2021-11-25T16:06:47Z")

</div>

When a code has painted itself into a corner, or discovered an unexpected catastrophic error, it is useful to the developer if the code provides a back trace. Although it’s probably a source of confusion for the user, at…

---

## [Size() vs. len() for characters in generic programing](https://fortran-lang.discourse.group/t/size-vs-len-for-characters-in-generic-programing/2236)

<div class="topic-metadata">

**Author:** [@shahmoradi](https://fortran-lang.discourse.group/u/shahmoradi)\
**Replies:** 15\
**Last updated:** [November 9, 2021, 1:55pm UTC](https://fortran-lang.discourse.group/t/size-vs-len-for-characters-in-generic-programing/2236 "2021-11-09T13:55:28Z")

</div>

The following code is not standard-conforming, print \*, size("fortran") because, Error: ‘array’ argument of ‘size’ intrinsic at (1) must be an array One has to instead use, print \*, len("fortran") This, however, cr…

---

## [New category topics for "language enhancement" or "feature request"](https://fortran-lang.discourse.group/t/new-category-topics-for-language-enhancement-or-feature-request/2237)

<div class="topic-metadata">

**Author:** [@shahmoradi](https://fortran-lang.discourse.group/u/shahmoradi)\
**Replies:** 2\
**Last updated:** [November 6, 2021, 7:42pm UTC](https://fortran-lang.discourse.group/t/new-category-topics-for-language-enhancement-or-feature-request/2237 "2021-11-06T19:42:36Z")

</div>

I cannot seem to find an appropriate category for a topic that falls under “language enhancement” or “feature request”. Does it make sense to add such a category? In my opinion, it does. It could serve as a clean list of…

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

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