Bug 20976 – pipe documentation incorrectly renders part of memoize

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-25T15:56:18Z
Last change time
2024-12-01T16:37:08Z
Assigned to
No Owner
Creator
John Hall
Moved to GitHub: phobos#9800 →

Comments

Comment #0 by john.michael.hall — 2020-06-25T15:56:18Z
On the dlang site here: https://dlang.org/library/std/functional/pipe.html the following documentation comment is partially shown and then cut off strangely. However, this is also the documentation for memoize and not pipe. It should not be shown at all. /** * $(LINK2 https://en.wikipedia.org/wiki/Memoization, Memoizes) a function so as * to avoid repeated computation. The memoization structure is a hash table keyed by a * tuple of the function's arguments. There is a speed gain if the * function is repeatedly called with the same arguments and is more * expensive than a hash table lookup. For more information on memoization, refer to $(HTTP docs.google.com/viewer?url=http%3A%2F%2Fhop.perl.plover.com%2Fbook%2Fpdf%2F03CachingAndMemoization.pdf, this book chapter). Example: ---- double transmogrify(int a, string b) { ... expensive computation ... } alias fastTransmogrify = memoize!transmogrify; unittest { auto slow = transmogrify(2, "hello"); auto fast = fastTransmogrify(2, "hello"); assert(slow == fast); } ----
Comment #1 by john.michael.hall — 2023-02-08T19:45:36Z
My hunch is that the problem is associated with the top part of memoize using the * along the end, but then dropping it later for the Params section.
Comment #2 by nick — 2023-11-25T17:43:33Z
Comment #3 by robert.schadek — 2024-12-01T16:37:08Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9800 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB