j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
178 stars 15 forks source link

Just some experiments - they may or may not be useful #32

Open arjenmarkus opened 5 years ago

arjenmarkus commented 5 years ago

A couple of months ago I wrote two notes regarding programming features that might be useful in specific cases, with matching code examples. They were intended just as experiments, but since this project is gathering ideas for further development of Fortran, I thought they might fit in here.

They can ben found at my Flibs project, but here are copies of the notes:

The prototype pattern as an alternative to class-based object-oriented programming - prototypes_pattern.pdf

Lambda expresssions (anonymous functions) - lambda_expressions.pdf

Like I said: At this moment they are no more than experiments.

certik commented 5 years ago

@arjenmarkus thank you for sharing it. These are precisely the kind of discussions and experiments that we need to be doing as a community to move the generic programming forward. I think this will be useful for @tclune's efforts.

arjenmarkus commented 5 years ago

Thanks. That was certainly one reason to create the issue.

It is fun to work on such experiments - of course, an actual application is not always easy to fit into existing programs. It is also revealing that such things are possible, though perhaps clumsy or laborious, with the current Fortran standard. I feel that with a bit of work, most of clumsiness or labour can be done away with.