Skip to content

Naming rules for initializer & finalizer of procedural API #143

Open
@masuday

Description

@masuday

I have a concern about the naming rules of the initializer and finalizer of an object (or user-derived type). It is unclear for traditional APIs, while it is relatively clear for object-oriented APIs. I quickly checked MKL, NAG, and IMSL.

  • MKL: new for initializer, and delete for finalizer (for random number generators)
  • NAG: init for initializer, and no finalizer
  • IMSL: no initializer/finalizer; having comprehensive subroutines initialized by arguments like IPARM(*)

The other question is whether it should be prefix or suffix. My suggestion is to have init for the initializer and final for the finalizer to be a suffix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationmetaRelated to this repository

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions