`decimal` Literals
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Description
It would be helpful to have a more concise way to specify numbers of type decimal. JavaScript solved a similar issue with BigInts by using a postfix.
decimal("0.5") // current
0.5d // proposed
Use Case
We are currently not using decimals in some places it would make sense to, simply because decimal("0.5") is too long and would visually polute the codebase.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue proposes decimal("0.5") and the postfix form 0.5d, but names no files, tests, or compiler entry points. Start by locating Typst's numeric literal parsing and decimal representation, then determine the syntax and semantics needed for the proposal. Done means the feature is specified, implemented, and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100