Clojure

GC Issue 8: :default as keyword arg to defmulti

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Reported by richhickey, Dec 17, 2008
rather than positional arg

Comment 1 by richhickey, Dec 17, 2008
(No comment was entered for this change.)
Status: Accepted
Comment 2 by richhickey, Dec 17, 2008
(No comment was entered for this change.)
Owner: ---
Comment 3 by m...@kotka.de, Jan 05, 2009
Attached is a patch, which turns the default dispatch value from a positional argument
into a keyword argument. The syntax is:

(defmulti name dispatch-fn :default dispatch-value)

Uses of the old syntax throw an exception pointing to the new syntax.
 issue-8.diff
1.4 KB Download
Comment 4 by m...@kotka.de, Jan 11, 2009
Another update of the patch, also including docstring and metadata support, similar to defn.

This was brought up several times on the list. Eg. in the thread:

http://groups.google.com/group/clojure/tree/browse_frm/thread/21af6e0431ae2e63/f7751913e875953f?
rnum=11&_done=%2Fgroup%2Fclojure%2Fbrowse_frm%2Fthread%2F21af6e0431ae2e63%2Ff7751913e875953f%
3F#doc_b5a6f9049a2ff250
 issue-8.diff
2.5 KB Download
Comment 5 by richhickey, Jan 22, 2009
Patch applied - svn 1226 - thanks!
Status: Fixed

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: