JuliaPhysics / JuliaPhysics/Unitful.jl

Unit type computations

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

Description

It would be nice to be able to compute on the type directly:

```julia
using Unitful
uType = typeof(1u"kg")
tType = typeof(1u"s")
uType/tType
```

This would allow the computation of where types as well:

```julia
using Unitful
uBottomEltype = Unitful.Quantity{Float64,D,U} where U where D
tType = typeof(1u"s")
uBottomEltype/tType
```

Currently, handling recursive arrays is incompatible with Unitful due to the inability to do this calculation.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two Julia examples using Unitful.Quantity types and inspect how the library currently handles unit arithmetic on values versus types. Done means the shown type-level divisions compute correctly, including the parameterized uBottomEltype case, and recursive arrays are compatible with Unitful.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.