Discussion Overview
The discussion revolves around the possibility of allowing users to input a function in Fortran 90/95 at runtime, rather than having it predefined in the code. The scope includes programming techniques, language capabilities, and potential workarounds for dynamic function evaluation.
Discussion Character
- Technical explanation
- Debate/contested
Main Points Raised
- One participant inquires about the feasibility of reading a function in Fortran, expressing a desire for user-defined input rather than hardcoded functions.
- Another participant notes that Fortran is a compiled language and suggests that an interpreting feature would require building a parser.
- A further contribution clarifies that inputting a function involves parsing text input to derive its semantic meaning, emphasizing the distinction between user input and programmatic function calls.
- Options are presented for achieving dynamic function evaluation, including writing a parser or interpreter, or compiling functions at runtime, with a comparison to languages like JavaScript that support runtime code execution more easily.
Areas of Agreement / Disagreement
Participants generally agree that Fortran does not support direct user input of functions in the way described, and multiple competing views on potential solutions and workarounds are presented.
Contextual Notes
Limitations include the need for a parser to interpret user input and the constraints of Fortran as a compiled language, which affects how functions can be dynamically handled.