Skip to content

GENERAL CONCEPT: How to discourage/remove implicit save & streamline variable initialization? #15

@zbeekman

Description

@zbeekman

My proposal in #12 was infeasible as @milancurcic pointed out.

So far two possible options are

  1. Make obsolescent variable initialization during declaration (because these variables get the implicit save attribute

  2. Add an additional attribute to allow variable initialization during declaration that would make the variable a non-saved variable.

In my opinion the number one draw back of Fortran is its verbosity (including a lack of generic programming facilities). Disallowing variable initialization during variable declaration (1) will necessitate an additional line of code to perform the initialization assignment, and adding an extra attribute (2) to prevent implicit save still necessitates more typing.

Upon further consideration, (2) has now become my preference since multiple variables could be declared and initialized on the same line, requiring the addition of only 1 extra word (the new attribute). IMO this is more compatible with the "don't repeat yourself" (DRY) principle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions