pretty has been experimental with an undocumented sole method since 2006: document it or remove it
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
This issue was triaged from [`bugs/dan/4-pretty-plan`](https://github.com/Macaulay2/M2/blob/388c1ff0ce30d83751dea7bc7eac77fdc1305dd7/bugs/dan/4-pretty-plan), one of the 857 files removed from the pre-GitHub `bugs/` tree by [`d2c8d27826`](https://github.com/Macaulay2/M2/commit/d2c8d27826) and catalogued in [#36](https://github.com/Macaulay2/M2/issues/36). **The commentary below was written by Claude (Claude Opus 5, via Claude Code)**, not by @d-torrance, whose account posted it -- please weigh it accordingly.
### The original file, verbatim
```text
pretty:
-- option for which types to dig into
-- option for readability, as in toExternalString
In-Reply-To: <200606282004.k5SK4sj05675@u00.math.uiuc.edu>
From: Michael Stillman
Subject: Re: bettiTally
Date: Wed, 28 Jun 2006 16:10:23 -0400
To: dan@math.uiuc.edu
On Jun 28, 2006, at 4:04 PM, Dan Grayson wrote:
>
>
> What if we enhance "pretty" so readability is an option? Its
> output is really
> *very* pretty, and it obeys the value of printWidth strictly.
> That's where I'd
> like to spend my time.
>
That sounds good. It would be nice if there were an option to
produce machine readable pretty output too.
```
### Where it stands today
`pretty` has been declared experimental since 2006, its only method is `undocumented`, and no
package or Core function calls it. It is worth deciding whether to document it or drop it.
Its whole implementation is three lines (`m2/pretty.m2:6-8`):
```m2
pretty = method(Dispatch => Thing)
pretty2 = method(Dispatch => Thing)
pretty Thing := x -> stack pretty2 x
```
and its whole documentation is in `Macaulay2Doc/experimental.m2`:
```m2
undocumented (pretty, Thing)
document { Key => pretty,
Headline => "a pretty printer", "This function is experimental and under development." }
```
So the name is exported and appears in `about`, but the one method that does anything carries no
page, and the node a reader lands on tells them only that it is unfinished.
### Why now
The bug file this comes from is a 2006 plan to invest in it — two new options, one for which types
to dig into and one for machine-readable output, prompted by Dan writing *"Its output is really
**very** pretty, and it obeys the value of printWidth strictly. That's where I'd like to spend my
time."* Twenty years later the options do not exist, the function is unchanged, and the plan is the
only record that anyone intended to develop it.
Either outcome closes this:
- **Document it.** `(pretty, Thing)` gets a page, the "experimental" sentence goes, and the
function joins the printing tools proper.
- **Remove it.** If nothing uses it and nobody intends to, exporting a name whose documentation
says it is unfinished costs more than it returns.
I have no view on which; the point is that "experimental and under development" has not been true
in either direction for a long time.
`open` · disposition `issue` · source of truth: [`bug-triage/catalog.tsv`](https://github.com/d-torrance/M2/blob/bug-triage/bug-triage/catalog.tsv)
Contributor guide
No contributing guide indexed for this repository
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
Start with m2/pretty.m2 and Macaulay2Doc/experimental.m2, then verify the reported absence of package or Core callers before choosing a direction. The issue is done when maintainers have chosen either a complete documented interface for pretty or removal of the exported function and its experimental documentation.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100