From: SMTP%"[log in to unmask]" 5-JAN-2000 01:24:25.29
> Yet another way that wasn't explicitly on Richard's list (although it's
> subsumed under his fourth alternative):
>
> Write as much of the guts of each of your list-handling routines as can be
> written without reference to types or kinds, in any way (not even constants).
>
> Put each of these "guts" in a separate file, one for each routine.
>
> Write a new routine for each new type, complete with the appropriate
> type specifications and any type/kind-specific stuff, and then "include"
> the appropriate "guts" file. If you need to put type/kind-specific stuff
> in the middle, you may need to chop the "guts" file into pieces. Use
> parameters in the header for type/kind-specific constants.
Something similar could/should be used for generic routines? Another
place where include is needed? Could something similar to ELEMENTAL be
introduced to avoid duplication of code for different types, as
ELEMENTAL did for different shapes?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|