writing dsl in clojure

24
DSL in Clojure Misha Kozik @mishadoff

Upload: misha-kozik

Post on 15-Jul-2015

1.188 views

Category:

Software


0 download

TRANSCRIPT

DSL in Clojure

Misha Kozik @mishadoff

developer domainexpert

Abstraction

not Turing Complete

DSL Example: SQL

Apache Calcite

DSL Example: Hadoop

DSL Example: Cascading

DSL Example: Cascalog

DSL Example: Hiccup

DSL Example: Lein

DSL Example: Regexp

DSL Example: TimeUnit

DSL Example: ->

Demo: Binary Tree

0

1 2

3 4 5

6 7 98NIL NIL

NIL

Demo: Binary Tree

Internal DSL: Tree

…well that’s verbose…

Internal DSL: Tree

…from Java with Love…

Internal DSL: Tree

i -> (2i + 1, 2i + 2)

Internal DSL: Tree

Lisp way

Internal DSL: Tree

External DSL: Tree

wow, such declarative

Generative DSL: Tree

Summary

Questions?