3 ms·
When I think of destructuring match, it's not just about destructuring, but also about matching a set of clauses against the matches. I rely on the imperative
by yumaikas 5y ago
When I think of destructuring match, it's not just about destructuring, but also about matching a set of clauses against the matches.
I rely on the imperative parts of Janet less than I used to, but yeah.
I am surprised that no one has tried to build something like Sinatra for Clojure. From what I can see, nothing would keep Clojure from being able to make something like that.
- nlitened 5y agoI assume you mean something like clojure.core.match https://github.com/clojure/core.match https://github.com/clojure/core.match ? It is available, but not used that often.
- diggan 5y ago> I am surprised that no one has tried to build something like Sinatra for Clojure. From what I can see, nothing would keep Clojure from being able to make something like that. Sinatra is a framework rather than a library (Sinatra calls your code when requests come in rather than you calling the library code when requests come in [we call you VS you call us]) and so generally doesn't get a lot of mindshare in the Clojure community, where small, composable libraries are preferred. Normally I see people using Ring (http request/response abstraction) + Compojure (routing) + Ring-compatible HTTP server (something like http-kit) for those purposes, and is what I normally use myself as well. Works well and once you've grokked the architecture of plugging those together, it becomes easy to hunt down issues and switch out parts whenever you want.