
Compojure - Clojure web framework - maryrosecook
http://github.com/weavejester/compojure/tree/master
======
ivey
Last night I added an entry to Things: "build something in Compojure". I'm
taking suggestions.

------
shaunxcode
I am sure this has been discussed to death somewhere else (point me there?)
but what is the advantage of adding [ ] for defining arguments to a
proc/lambda? I assume it is to help it stand out a little more? What I love
about lisp/scheme is the symmetry and simplicity in syntax - though it does
clearly state in the scheme spec that [ ] are reserved for future language
revisions.

~~~
jefffoster
Clojure extends the syntax of Lisp to include first class support for data
structures other than lists (vectors, sets and maps).

Vectors are the [ ] structure you see. You can use ( ) to specify a number of
function bodies which differ on arity e.g:

    
    
      (defn foo ([x] x) ([+ x y])
    

So it's not to stand out more, rather it's extending the Lisp syntax to make
items other than lists "first-class" whilst retaining the homoiconic
properties of Lisp.

------
tlrobinson
I like the DSL-ish style of routing (http method, url pattern, handler
method/block). The same thing is used in Sinatra
(<http://sinatra.github.com/>):

    
    
        get '/' do
            'Hello world!'
        end

~~~
ericlavigne
Compojure was created by James Reeves, who said:

"The language I work with from day to day is Ruby, so Compojure has a lot in
common with lightweight Ruby frameworks like Sinatra, and less with existing
Java frameworks. It's designed for impatient, lazy people like myself, so it's
quick to install and quick to start developing in."

[http://groups.google.com/group/clojure/browse_thread/thread/...](http://groups.google.com/group/clojure/browse_thread/thread/448865254f9bd293/58065c93483c5c8a)

