fortran66のブログ

fortran について書きます。

次々期 Fortran 規格は Fortran 2020 ?

NAG のサイトの Fortran 規格の Working group のページに Fortran 次々期規格についての話が出ていました。西暦 2020 年に話が始まるようで、ケムール人もびっくりの Fortran 2020 となるのでしょうか。またしてもマイナーチェンジを目指すようです。

入れてほしい機能を目安箱よろしく WEB で広く募るようです。優先されるのは現今のコンパイラ構造や実行速度に不利にならないということのようで、いままで通りでブレがありません。

ISO/IEC JTC1/SC22/WG5 (Fortran)

12 July 2017
The next revision of the standard

The meeting also began thinking about the next revision. The intention is that this will be small with the technical content chosen in 2020. New features should be adopted only if they had long-term viability; those with only a minor benefit for users but a negative effect on compiler construction or performance should be avoided. There is a need to investigate what Fortran users want to do in the language and is not currently possible. It was agreed that a web survey of users would be instituted.

https://i.ytimg.com/vi/EOtl4uW5n-4/maxresdefault.jpg

私が思いついたのは、Python の如く左辺に [x, y] = f(a, b) みたいに配列構成子を置いてスカラー変数の組に受けたり、y = f(x) !! n みたいに配列を返す戻り値の n 番目の要素を取り出すような命令ですが、左辺をいじるのはコンパイラ構造に大きく影響しそうな気がします。また n 番目の値を返すのは自分で関数を書けばいい気がします。

あとは、以前書いた気がしますが assignment operator への overload で、 elementai な subroutine は代入による自動 allocation が出来なくなることが気になります。

ネット界隈では、関数を返り値とすることや、ジェネリックが欲しいというのを見たことがあった気がします。