Skip to content

Instantly share code, notes, and snippets.

@Velrok
Created July 5, 2013 09:08
Show Gist options
  • Save Velrok/5933148 to your computer and use it in GitHub Desktop.
Save Velrok/5933148 to your computer and use it in GitHub Desktop.
layout title date comments categories
post
Clojure Lesson Learned
2013-07-04 18:45
true

background

likes

  • immutable data structures
  • awesome that they are persistent
<iframe width="420" height="315" src="//www.youtube.com/embed/wASCH_gPnDw" frameborder="0" allowfullscreen></iframe> - syntax flexability - REPL

dislike

  • debugging :(
  • error messages
  • suspission: partial
  • JVM startuptime xD

lessons learned

  • thinking with immutable data structures in very different. You will need some time.
  • don't overuse use
  • inject state via function arguments, done this one right, see Stuart Sierrra: Clojure in the Large
  • don't overuse ->> let is ok in many cases
  • Write test!! despite the REPL (was a bit to lazy in that regard)
    • The default Test framework seams to be midje
    • but I liked my classical TDD/BDD DSL so I used speclj
  • prallel pmap does the trick in many cases
    • start at top level
  • want to experiment more with reducers!
  • pre and post assertions are a blessing and so easy to use
  • you need only a hand full of vars. In many cases none at all. Ask Stuart ;)
  • they introduce global state, so use with utmost caution
  • I can't remember the syntax for optional parameters!

vim and clojure

  • vim fireplace REPL more stable that sublime REPL
  • Sublime Repl nicer (because it shows the last call)
  • vim fireplace hace invaluable :Doc and :Souce commands!
  • no ctags support for clojure but lisp works fine
  • rainbow parentecies
  • y%and d% are big time and brain power savers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment