Skip to content

Commit c55ce03

Browse files
5 mins Clojure propaganda (a LISP sucker punch)
1 parent 255464d commit c55ce03

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

sucker-punch-propaganda/README.org

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
* Why Clojure ?
2+
An exercise in /sucker punch/ propaganda ☺
3+
* Shapir Whorf hypothesis
4+
(Yet) Another language ?
5+
- some languages make better programs
6+
- some also make better programmers !
7+
* Low barrier to productivity thx to perfect Java interop
8+
- Can use/create any java object
9+
- same primitive types (incl. java.lang.String)
10+
Solves the chicken-egg problem (libraries, users base) that have been
11+
keeping us with C for decades despite all the good work in academia.
12+
* A Simple Language
13+
- Simple :: ≠ easy
14+
- Fighting incidental complexity :: There is no pride to have in
15+
mastering needlessly complex tools (java programmers understand
16+
this very well when talking about C++ ☺).
17+
[Richhickey-StuartHallowaySimplicityAintEasy905.mov]
18+
* Object Oriented !
19+
- type
20+
- identity
21+
- state
22+
- attribute names → values
23+
- mutability
24+
- (single) dynamic dispatching
25+
- namespace
26+
Clojure has it *all*, /à la carte/.
27+
* Sane defaults
28+
- immutability : Value Oriented Programming (transients available but
29+
the persistent data structures are extremely efficient)
30+
- dynamic typing (type annotations also available)
31+
- lexical binding (dynamic binding also available)
32+
- static dispatching (dynamic dispatching available, single or
33+
multiple)
34+
- open structures as maps of interned strings (closed struct available)
35+
* Practical SMP primitives
36+
- thread local mutations of /vars/
37+
- queued asynch mutations on /agents/
38+
- atomics mutations
39+
- single /atoms/
40+
- transactions on multiple /refs/
41+
* Very Simple Syntax ☺
42+
"Oh, btw, it's a LISP" (→ angry meme pic ☹)
43+
Not necessarily /easy/ at first but :
44+
- syntactic grouping of pairs
45+
- code is data (list), but most data structures are not lists :
46+
- [vector]
47+
- {map}
48+
- #{set}
49+
- IDE (e.g. emacs) to the rescue !
50+
- help writing (electric parenthesis)
51+
- help reading (rainbow parenthesis)
52+
- e.g. ≠ i.e. ☺
53+
* Metaprogramming done right
54+
- David Wheeler :: "All problems in computer science can be solved by
55+
another level of indirection".
56+
- Myself :: "Any boring (part of a) task can and should be automated away"
57+
- Myself again :: "Programming should be fun !"
58+
59+
Hence you should be able to automate programming !
60+
To make it /easy/, you *need* the /simple/ syntax of code as data structure.
61+
(disclosure: I'm a Boost::mpl user)
62+
[Macronomicon by M.Fogus]
63+
64+
* Conclusion
65+
Perfect Plateform for :
66+
- Pompous Purists :: you can add your monads with macros !
67+
- Productivity Pirates™ :: you can reuse all the java libs/frameworks !
68+
- Painful PHBs :: it's all jars for you, JarJar !
69+
70+
Not all side effects are evil : by learning this language, you'll also
71+
learn concepts form the great minds behind it. You will also get a
72+
better understanding of concepts you already (think you) know
73+
(e.g. OOP, state, time, value, hammocks…).
74+
75+
Learn things and have fun ! (I know you will ☺)
76+

0 commit comments

Comments
 (0)