Skip to content

What should be part of stdlib? #1

Open
@milancurcic

Description

@milancurcic

Existing libraries, for inspiration or adoption


First issue in this repo which evolved from this thread. This is a broad, open ended, high-level issue, so feel free to go wide and crazy here.

To propose a specific module, procedure, or derived type, please open a new issue. You can follow the same format as in Fortran Proposals.

Wishlist from upthread

From @apthorpe:


From @FortranFan:

  • Containers
    • string type
    • bitsets
    • Enhanced 'array' types such as vectors, singly-linked and doubly-linked lists, etc.
    • Adapters such as stacks, queues, etc.
    • Associative ones such as dictionaries (maps), hash_sets, etc.
  • Algorithms
    • Generic methods for sort, findloc, etc. that can work with any type, intrinsic and derived,
    • Operations and permutations on a range of elements such as merge/union, difference,
      etc.
  • Utilities
    • Iterator-like facilities which make it easy to work with Containers,
    • Operator (<, >, ==, etc. ) and assignment(=) overload abstractions that perhaps make
      the use of standard algorithms more efficient?
    • Miscellaneous other functions, subroutines (like generic swap), datetime, named
      constants, etc.
  • Special
    • Any basic facilities (extensions perhaps to ABSTRACT INTERFACE block?) needed toward
      "special" functions such as Variadic ones in the language e.g., MAX, MIN
    • Ability to "overload" array subsection notation facility with Containers that standard Fortran
      provides with its 2 built-in containers: arrays and CHARACTER intrinsic type.
    • Any special mechanisms that can help aid with improved constructors of arrays/containers
      and derived types ('classes'). I envision certain fundamental 'computer engineering' aspects
      being pursued here that can enable, say, efficient operation on the diagonal of a matrix or
      initialization to an identity matrix; or efficient 'dynamic' construction of 'classes' in Fortran similar
      to that is achieved near universally using new keyword in other languages.

From @zbeekman:

  • Strings
    • Conversion to/from integer/real/logical (all kinds of each)
    • Conversion on string concatenation
    • raw string processing functions inspired by Ruby & Python
    • string class to make using all the machinery easier via TBPs
  • Files
    • For now just name manipulations like dirname, basename, etc.
  • OS/Environment integration
    • is_a_tty(), OS%env("HOME"), .envExists. "USER", etc.
  • Unit testing & assertions stuff
    • Subtest summaries w/ color
    • File and line number triggering failures
  • Error Stack class/object
    • Maintain a call-stack
    • Raise errors, but optionally trap them later with good call stack including line number and file

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaRelated to this repository

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions