ModuleMixins.jl

Library for performing module level mixins (a la Ruby) in Julia
Author jhidding
Popularity
0 Stars
Updated Last
5 Months Ago
Started In
July 2024

ModuleMixins

Stable Documentation In development documentation Build Status Test workflow status Docs workflow Status

Coverage DOI Contributor Covenant All Contributors

ModuleMixins is a way of composing families of struct definitions on a module level. Suppose we have several modules that contain structs of the same name. We can compose these modules such that all the structs they have in common are merged. Methods that work on one component should now work on the composed type.

using ModuleMixins

@compose module A
  struct S
    a
  end
end

@compose module B
  @mixin A

  struct S
    b
  end
end

@assert fieldnames(B.S) == (:a, :b)

See the full documentation.

How to Cite

If you use ModuleMixins.jl in your work, please cite using the reference given in CITATION.cff.

Contributing

If you want to make contributions of any kind, please first that a look into our contributing guide directly on GitHub or the contributing page on the website.


Contributors

Required Packages

Used By Packages

No packages found.