Provide a first class Decimal class to allow arbitrary precision decimal types that support monetary mathematics.
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
### Discussed in https://github.com/apple/pkl/discussions/1119
Originally posted by **DamianReeves** July 10, 2025
Floats are not ideal for monetary calculations as they are not precise. It would be beneficial if Pkl included a decimal type to help with not only specifying decimal types, (which is fairly easy to do), but also providing decimal mathematics (which is a bit more difficult to get right on the user side).
Contributor guide
Research direction
Start by reading the linked discussion 1119, which contains the original rationale and request. Define what a first-class Decimal type and its monetary mathematics must include; the issue does not name implementation files, tests, or a more specific completion criterion.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100