Type-specific overloads in Phobos
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Sun Nov 3 01:07:04 PST 2013
Hello all,
There are various generic functions in Phobos that can benefit from
type-specific overloads. For example, in std.math and std.numeric, functions
that deal with integers may benefit from having specialized implementations to
work with BigInt.
Question: what's the appropriate location for these overloads? In the same
module as their type, or in the same module as the function they're overloading?
What are the implications for correct inferring of what function to use, or
useful aliases (e.g. alias abs = std.math.abs)?
Thanks & best wishes,
-- Joe
More information about the Digitalmars-d-learn
mailing list