-
Notifications
You must be signed in to change notification settings - Fork 4
Description
We could define a universal getter like:
get_process(coupled_processes, AbstractEvapotranspiration)to avoid the boilerplate of every AbstractCoupledProcesses subtype needing to define a series of get_* methods, similar to what was previously done for models.
This could take advantage of the fact that the processes method provides compile-time information about process types defined on any model or coupled processes type.
Alternatively, we could generate such methods for all AbstractCoupledProcesses types semi-automatically using macros.
However, this is also one of those situations where we would trade transparency for a relatively minor reduction in boilerplate. Sometimes boilerplate is good for clarity and simplicity :)
Also LLMs are good at generating boilerplate code, so one could also ask: why bother?
@maximilian-gelbrecht Following up on discussion in #68