- regarding use of pkg, are these two examples both doing the same thing (one parent pkg exports functions from all the others)?
- is there case where one might instead do: each child pkg uses functions from a common parent (DifferentialEquations.jl has this relationship with DiffEqBase, but in general does not use this model)
Sorry this is a bit open ended, just looking for a bit of clarification on two examples of ‘hierarchical package design’ that seem to have different implementations of
using, and when to use which:
ex 1: DifferentialEquations.jl
module DifferentialEquations using Reexport @reexport using DiffEqBase ... import DiffEqBase: solve ... end
ex 2: FinEtools.jl
module FinEtools ... using .FTypesModule: FInt, FFlt, FCplxFlt, FFltVec, FIntVec, FFltMat, FIntMat, FMat, FVec, FDataDict # Exported: basic numerical types, type of data dictionary export FInt, FFlt, FCplxFlt, FFltVec, FIntVec, FFltMat, FIntMat, FMat, FVec, FDataDict ... end
I have one body of code with fairly specific functionality and several more bodies of code that use this functionality, but otherwise have very different dependencies (one even has c code wrapped), I want to package these as separate modules for maintainability.