Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Procedure / Subroutine / Function refactoring #196

Open
mlange05 opened this issue Nov 27, 2023 · 0 comments
Open

Procedure / Subroutine / Function refactoring #196

mlange05 opened this issue Nov 27, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mlange05
Copy link
Collaborator

Conceptually, our use of the class Subroutine is broken, as it merely differentiates between Function and Subroutine by a single flag attribute. The correct representation would be to have an abstract Procedure type that is a specialisation to ProgramUnit, but cannot actually be instantiated. From there, both Subroutine and Function should inherit the basic methods/properties of dealing with "Callable" program unit objects, where Function specialises all properties and methods that deal with return types and return type names.

Note, that this incorrect representation was originally done out of convenience, but has been allowed to spread quite widely through the entire code and test case. Any refactoring to this intent will subsequently by very invasive, so care needs to be taken.

@mlange05 mlange05 added the enhancement New feature or request label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant