Sunday 10 March 2013

Skimmer's Guide - "Chapter 10: Clojure: Safer Programming" of "Well-Grounded Java Developer"

Foreword

Recently I set-up the LJC Book Club (blog here) with Ged Byrne and the first book we chose was "The Well-Grounded Java Developer" by Benjamin Evan and Martijn Verburg.

As a part of the reading schedule, Ged and I are hoping to produce a weekly "Skimmer's Guide". 

This is my first such attempt and hopefully there will be many more to come!




“..Lisp is an acronym for Lots of Irritating Silly Parentheses...”

What did we read about?

Week 6 has brought us to the Clojure chapter which focuses on introducing the functional language to Java developers. The topics range from your simple 'Hello World' program all the way to Clojure style concurrency being used to steal all the money from Ben's account!


What stood out?

Arithmetic, equality and other operators (p. 287)
Simple explanation of the Clojure mathematical operators and introduces variadic functions. In-short using a variable number of function parameters - e.g. (+ 1 2 3) // returns 6

Schwartzian transform (p. 290)
Great example which allows you to learn how to read Clojure "inside-out" and really get to grips with core concepts of functional programming.

Multi-thread ATM (starting p. 308)
Fantastic example of whole concise Clojure can be over Java, as well as explaining how to do concurrency in Clojure.


If you read nothing else this week...

Getting started with the REPL (p. 281)
Get started hacking on the "Clojure console" and learn about mutable/immuntable state in Clojure.
Interoperating between Clojure and Java (p. 299)
Learn how to call Java from the "Clojure console" and get under the covers of Clojure on the JVM.

No comments:

Post a Comment