From e289d35b8f74a023df9236ad092b07959c800b7f Mon Sep 17 00:00:00 2001 From: Brandon Flores Date: Mon, 10 Jun 2024 15:23:27 -0500 Subject: [PATCH] Added notes on function exports and package extensions to docstrings --- src/abstract.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/abstract.jl b/src/abstract.jl index b6a403c..36fca53 100644 --- a/src/abstract.jl +++ b/src/abstract.jl @@ -117,6 +117,16 @@ form must be wrapped in a `Val` to preserve type stability. This function must be defined with all its arguments for each concrete type subtyping `AbstractCliffordNumber`. + +# Note on function export + +This function is nearly identical in semantics to `StaticArraysCore.similar_type`. However, since +this package does not depend on `StaticArraysCore`, this function is not exported to avoid name +conflicts whenever any package exporting `StaticArraysCore.similar_type` is loaded. + +If a package exports `StaticArraysCore.similar_type`, that function will have methods added which +match the methods in this package with the same signature. This may be triggered explicitly if +desired with a `using` or `import` directive. """ function similar_type(x::AbstractCliffordNumber, T::Type{<:BaseNumber}, Q::Val) return similar_type(typeof(x), T, Q)