◊(Local Yarn Code "View Ticket")

Ticket Hash: fbbb5ed93f0d7e1b0574a2f6bf81e3486f69089a
Title: Macros in pollen.rkt are redundant
Status: Closed Type: Code Defect
Severity: Cosmetic Priority: Medium
Subsystem: Resolution: Fixed
Last Modified: 2019-03-16 20:57:36
Version Found In:
User Comments:
joel added on 2019-02-11 05:21:59: (text/x-fossil-plain)
The macros poly-branch-tag and poly-branch-func are redundant. The second one does everything that is needed. The current poly-branch-tag should be eliminated, and poly-branch-func should be renamed to poly-branch-tag.

joel added on 2019-03-16 20:57:36: (text/x-fossil-wiki)
Resolved in [6b60dc]. It turns out the macros are not redundant: one handles keyword arguments and one doesn’t. Maybe I knew this at one point and forgot. At any rate, the resolution was to change the names of the macros and change the way they are documented.

I could have gone with a single function to handle all cases, but my thought was that perhaps I would benefit by not using <code>define-tag-function</code> in places where I didn’t need keyword arguments. I have not benchmarked this or anything, but <code>define-tag-function</code> is itself a macro that uses <code>make-keyword-procedure</code>, which seems needlessly complicated and, surely (?), slower than just <code>define</code>ing a simple function when keyword arguments are not needed.