apple / apple/pkl

Provide a first class Decimal class to allow arbitrary precision decimal types that support monetary mathematics.

Open
#1,120 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.