◊(Local Yarn Code "View Ticket")

2019-03-16
20:57 Closed ticket [fbbb5ed9]: Macros in pollen.rkt are redundant plus 4 other changes artifact: 614c1d5e user: joel
20:44
Clarify poly-branch macro names (resolves [fbbb5ed9]) check-in: 6b60dccb user: joel tags: trunk
2019-02-11
05:22 Ticket [fbbb5ed9] Macros in pollen.rkt are redundant status still Open with 4 other changes artifact: 90d4d71d user: joel
05:21 New ticket [fbbb5ed9]. artifact: 9a17f4a2 user: joel

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:
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:

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 define-tag-function in places where I didn’t need keyword arguments. I have not benchmarked this or anything, but define-tag-function is itself a macro that uses make-keyword-procedure, which seems needlessly complicated and, surely (?), slower than just defineing a simple function when keyword arguments are not needed.