Skip to content

Parameterized write/print/display for numbers#3222

Open
elfprince13 wants to merge 3 commits intoracket:masterfrom
elfprince13:parameterize-numeric-printing
Open

Parameterized write/print/display for numbers#3222
elfprince13 wants to merge 3 commits intoracket:masterfrom
elfprince13:parameterize-numeric-printing

Conversation

@elfprince13
Copy link
Copy Markdown
Contributor

This pull request provides user control over how numbers are printed by introducing a new parameter, print-number->string-proc.
One use-case is to allow development of localized languages wherein a reader extension for different number representations can be paired with parameterized writing to output numbers using the same syntax.

This approach should:
a) have better performance than boxing your numbers in a structure type with writer extensions
b) be more easily composable than writing new write/print/display handlers from scratch and installing them on every port that might be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants