Open francescosalvadore opened 8 months ago
This use case is very similar to the one of the Pascal with
statement.
To be even more compact, it could have a "all" specifier, saying the all the components shall be associated:
associate (from self:(all); from self%base_gpu:(all); from self%equation_base:(all))
To go further, it could be combined with #321 :
associate (from self:(all)) &
(from base_gpu:(all); from equation_base:(all)) &
(cp => calorically_perfect)
Additionnaly, a suffix
specifier could solve the case where one wants to do that with several objects of the same type:
associate (from object1:(all); from object2:(all,suffix="2"))
would be equivalent to
associate (nx => object1%nx, [...,] nx2 => object2%nx )
Extending associate construct for object oriented contexts would be very useful for readability and development in my opinion.
Instead of writing something like this:
I would like to write:
Francesco