<< Back to previous view

[MATCH-44] regroup-keywords should not use gensym Created: 12/Dec/11  Updated: 28/Jul/13  Resolved: 12/Dec/11

Status: Closed
Project: core.match
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Steve Miner Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File 0001-improved-regroup-keywords.patch    
Patch: Code


I contributed the regroup-keywords function to allow 'flattened' match syntax for :when and :as. It used gensym to make a marker to simplify the algorithm. After seeing how other people had done similar things with sentinel values, I realized that (Object.) is a better unique value. Theoretically, an evil user could use the same symbol that the gensym had created. Also, it's better to test with identical? rather than = since the sentinel is unique. I will attach a patch with a slight refactoring.

Comment by David Nolen [ 12/Dec/11 9:30 PM ]

Fixed, https://github.com/clojure/core.match/commit/6d0f3fe33c4a85a12366d447e82cab59e299f94a

Generated at Thu Jan 18 22:02:46 CST 2018 using JIRA 4.4#649-r158309.