JuliaMath / JuliaMath/FixedPointNumbers.jl
[RFC] Orthogonality between signed/unsigned and `Fixed`/`Normed`
- Dominant language
- Julia
- Stars
- 95
- Forks
- 38
- Avg merge
- 13m
- Merged PRs (30d)
- 2
Description
As commented in https://github.com/JuliaMath/FixedPointNumbers.jl/pull/143#issuecomment-559182211, `Fixed`/`Normed` (i.e. the difference in scaling factor) and signed/unsigned are orthogonal concepts.
| Type (scaling) | `Fixed` (`2^f`) | `Normed` (`2^f-1`) |
|---------------:|:-------------------|:-------------------|
| signed | :heavy_check_mark: | :x: N/A |
| unsigned | :x: N/A | :heavy_check_mark: |
Historically, `Fixed` is signed and `Normed` is unsigned, but I think we should separate the two orthogonal concepts as much as possible.
I do not intend to support unsigned `Fixed` and signed `Normed` right now. However, I think that it is "safe" to describe in README.md that they may be supported in the future, because we have no systematic way to notify the downstream packages of the breaking changes to the existing `Fixed` and `Normed`.
(Whether relaxing is considered "safe" or "unsafe" depends on the point of view.)
At least I think it is worth writing that in CONTRIBUTING.md. It clarifies whether the code should be written in "src/FixedPointNumbers.jl", "fixed.jl" or "normed.jl". I think that the code which is not related to scaling factors should be written in "src/FixedPointNumbers.jl", i.e. should be commonized.
Contributor guide
Assessment
This issue has not been assessed yet.