Unfortunately, Fortran standard does not provide good support for generic programming so some level of repetition is necessary :/. I don't see this as a major issue though - boilerplate coding happens once. In any case, pick any language that supports generic programming, and if you dig deep enough, you will run into boilerplate, in one form or another. :)