Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Clojure Design
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Undo
Redo
Keyboard Shortcuts Help
<p><strong>Motivation</strong></p> <p>Want general purpose pattern matching, binding, unification. Possibly split into multiple services a la carte. My initial use case (generalizing how to limit reflection results) needs only matching, no binding or unification.</p> <p><strong>Issues</strong></p> <p>Based on a combination of my needs, the matching implementation I have proposed for clojure.data / reflection, and Drew Colthorp's matchure:</p> <ul> <li>desirable to support Clojure's equality partitioning <ul> <li>will never want assoc lists</li> <li>limits cross-partition uses of existing destructuring</li> </ul> </li> <li>minimize need for special forms <ul> <li>especially those such as matchure's "and" and "or" that usurp Clojure names</li> </ul> </li> <li>so far, prefer argument order as in matchure <ul> <li>match is the "object", comes first</li> <li>con: hurts ability to thread candidates via -></li> </ul> </li> <li>a la carte? <ul> <li>matching without binding is super simple</li> <li>matchure does binding but no unification</li> </ul> </li> <li>meaning of symbols <ul> <li>in matchure they are equality-matched (with some exceptions)</li> <li>think I prefer evaluating them (quote them to prevent)</li> <li>latter makes it easy to build new match patterns at runtime</li> </ul> </li> <li>what is the syntax for guard-and-bind? <ul> <li>matchure uses (and (pred form) ?varname)</li> <li>would like to find something that is used nowhere else</li> </ul> </li> <li>currently no way to say "exactly this map/set", as extra keys are ignored</li> <li>currently no way to say "this value must <strong>not</strong> be present"</li> <li>considered an rejected parameterizing match with an atom-matching function <ul> <li>would allow different interpretations of e.g. string matching (case-insensitive, partial, etc.)</li> <li>regexes cover all the string scenarios, and design already supports arbitrary functions</li> </ul> </li> </ul>
Attachments
Labels
Location
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced