[m-rev.] for review: pretty-printing sparse bitsets
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sun Sep 21 22:26:22 AEST 2025
The implementation is straightforward, the review is more for
how to present the new formatters to users, given that these
are "lossy" formatters. (They do not print the values in the given set;
they print only to result of applying the to_uint method to those values.)
I can see the following ways.
1. Simply add the formatters of the bitset types to the default formatter map.
2. Keep them out of the default formatter map, but add a predicate that
adds themall to that map.
2a. Make this new predicate a public part of the pretty_printer.m's interface;
2b. Make this new predicate a private part of the interface, i.e. put in a second interface section that is not included in the manual.
3. Export the fmt_*_bitset functions, and let users call set_formatter with them.
My order of preference is the one above: 1, 2a, 2b and 3. What's yours?
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.sbd
Type: application/octet-stream
Size: 429 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20250921/2e6c1c31/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.sbd
Type: application/octet-stream
Size: 9290 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20250921/2e6c1c31/attachment-0001.obj>
More information about the reviews
mailing list