1
votes

I'm trying to implement http router with Clojure https://github.com/clojure/core.match library. But since match is macro - it seems that runtime update of routing table is'n possible without using eval, which is evil. Is there any cleaner way to this?

1
For HTTP routing, look at Compojure, Noir, or Moustache - probably best not to roll your own, one of those would probably suffice. - Alex
Eval is not evil if you have tight control over what it gets to eval - Ankur

1 Answers

2
votes

As Alex said in the comments, you're going to want to check out Compojure.

Since you referenced routing in your question here is the Routes in Detail section of the documentation.

There is also this discussion on Stack Overflow about the "big idea" behind compojure routes.