I wouldn't be too stiff about your list of novelties. It's easy to shrug off homoiconicity (e.g. the syntax) or dynamic typing as 'bad' things. Don't overwhelm starters with complex (but nice) stuff.
Don't neglect the obvious: Clojure's API (clojure.core) is *super* simple. Clojure has a really nice & easy sequence api and in general is very good with data. Show them how short a simple implementation of 'Game of Life' (with a set of coordinat-tuples) is. That's also a very good way to introduce java-interop (for graphical output, I suspect they already know Java). Maybe my views on this can help you. Cheers, Moritz bernardH writes: > Hi all, > > I intend to (ab)use my authority as a teacher to enlighten unsuspecting > students > about Clojure. > > On the plus side, I may give them insights that they did not even know > they needed. On the minus side, I cannot expect (all of) them to be > curious about Clojure. > > Hence, I want to make a "demand driven" introduction. > > My goal is to : > 1. identify what novelties Clojure brings to the table to Java developers > - homoiconicity : macros > - syntaxing sugar (e.g ->, cond) > - programming paradigms as libraries > - core.logic > - core.async > - dynamic typing > - simple concurrency handling : > - immutable data structures > - ref > - atoms > - STM > - open-ended dynamic dispatching (protocols, namespaced vs. monkey > patching) > - multiple dispatching (multimethods) > - maps instead of classes (no privacy & accessors needed thx to > dynamic typing and immutable data) and composable libraries instead > of frameworks. > > 2. For as many of those features as possible, I'd like to find a minimal > use case that will be : > - genuinely interesting (so that they find it beliveable that they > might actually want to solve a similar problem) > > - complex (if possible hard!) / tedious to solve in Java (I will provide > the Java code) > > - simple (if possible easy) to solve in Clojure. > > > The idea being that they would conclude from : > 1. that the want to solve these problems > 2. that Java won't help them much but Clojure would help them a lot > > (+ 1. 2.) → > 3. They want to learn Clojure ! ☺ > > I'd be most grateful for any help, either to complete/amend my list in 1., > or to provide ideas for 2. > > > Best Regards, > > B. > > -- -- Moritz Ulrich
pgpcWyTfKFXAJ.pgp
Description: PGP signature