JuliaPhysics / JuliaPhysics/Unitful.jl

[Wishlist] Define an AbstractQuantity type

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

Description

A few months ago I've created a new package to provide physical constants: https://github.com/JuliaPhysics/PhysicalConstants.jl This package uses `Unitful.jl` and defines a new type which is mostly based on my proposal at #81. In order to be able to automatically use a `Constant` object in mathematical operations, I think it would be great to have an `AbstractQuantity` type here, that can be subclassed by `PhysicalConstants.jl` (see https://github.com/JuliaPhysics/PhysicalConstants.jl/issues/2). `Quantity` would be another concrete subtype of `AbstractQuantity`. I don't think the change would be very disruptive, it'd only be necessary to define the interface of `AbstractQuantity` and use it throughout this package (rather than accessing named fields).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the proposal in issue #81 and the related PhysicalConstants.jl issue #2, then inspect how Quantity is used throughout Unitful.jl. Done means defining the AbstractQuantity interface, using it throughout this package instead of named fields, and supporting PhysicalConstants.jl as a subtype.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.