https://github.com/gdalle/checkconcretestructs.jl
https://github.com/gdalle/checkconcretestructs.jl
julia types
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gdalle/checkconcretestructs.jl
- Owner: gdalle
- License: mit
- Created: 2024-10-30T05:58:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-19T04:58:55.000Z (over 1 year ago)
- Last Synced: 2024-11-19T05:39:42.369Z (over 1 year ago)
- Topics: julia, types
- Language: Julia
- Homepage: https://gdalle.github.io/CheckConcreteStructs.jl/
- Size: 220 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CheckConcreteStructs.jl
[](https://github.com/gdalle/CheckConcreteStructs.jl/actions/workflows/Test.yml?query=branch%3Amain)
[](https://gdalle.github.io/CheckConcreteStructs.jl/dev/)
[](https://app.codecov.io/gh/gdalle/CheckConcreteStructs.jl)
[](https://github.com/JuliaDiff/BlueStyle)
Faulty or missing [type declarations](https://docs.julialang.org/en/v1/manual/performance-tips/#Type-declarations), especially for struct fields, are a common performance pitfall in Julia.
This package allows you to check that the structs you work with have concretely-typed fields.
## Getting started
You can install CheckConcreteStructs.jl from the GitHub URL:
```julia
using Pkg
Pkg.add(url="https://github.com/gdalle/CheckConcreteStructs.jl")
```
The main exports of this package are:
- the function [`all_concrete`](@ref), which can be used on an existing type or module
- the macro [`@check_concrete`](@ref), which can be used before a `struct` definition
Please read their docstrings for examples.
## Related packages
[ConcreteStructs.jl](https://github.com/jonniedie/ConcreteStructs.jl) exports a macro `@concrete` which adds all the necessary type parameters to a `struct` definition. In other words:
- CheckConcreteStructs.jl tells you how to fix problems when they occur.
- ConcreteStructs.jl prevents them from occurring at all (in a slightly more opaque way).