JuliaPhysics / JuliaPhysics/Unitful.jl

`DimensionlessQuantity` differs from other “convenience types”

Open
#396 0 comments 0 reactions 0 assignees View on GitHub
dimensionless
Dominant language
Julia
Stars
675
Forks
124
Avg merge
3h 38m
Merged PRs (30d)
1

Description

Types like `Energy` exist for easy dispatch on quantities. However, the definition of `DimensionlessQuantity` differs from that of types like `Energy`:
```julia
julia> Unitful.Energy
Union{Quantity{T,𝐋^2 𝐌 𝐓^-2,U}, Level{L,S,Quantity{T,𝐋^2 𝐌 𝐓^-2,U}} where S where L} where U where T

julia> Unitful.DimensionlessQuantity
Unitful.AbstractQuantity{T,NoDims,U} where U where T
```
`DimensionlessQuantity` does not include `Level`s, and `Energy` does not include `AbstractQuantity`s that are not `Quantity`s. I would prefer them to be consistent and both include `Level`s as well as `AbstractQuantity`s.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.