Skip to content

Instantly share code, notes, and snippets.

@pbostrom
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save pbostrom/9df62d5c086d87c1af7b to your computer and use it in GitHub Desktop.

Select an option

Save pbostrom/9df62d5c086d87c1af7b to your computer and use it in GitHub Desktop.
;; Don't unroll optional named arguments.
;; While it's nice for callers to not have to wrap optional named arguments in a map,
;; clearly specified configuration maps are laudable.
(release-sharks 2 :laser-beams true) ; good
(release-sharks {:laser-beams true} 2) ; better, the configuration is the least variance argument
(release-sharks 2 {:laser-beams true}) ; bad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment