是否有任何 Clojure DSL? [英] Are there any Clojure DSLs?

查看:22
本文介绍了是否有任何 Clojure DSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Clojure 中是否有任何 DSL(领域特定语言)实现?

Is there any DSL (Domain Specific Language) implemented in Clojure ?

推荐答案

与任何 Lisp 方言一样,Clojure 在 API 和 DSL 之间划出了一条非常模糊的界线,因此该术语不像在其他语言中那样神秘.Lisp 程序员倾向于将他们的程序编写为 DSL 层,每一层都为上面的层服务.话虽如此,这里有一些您可以说显示非平凡级别的 DSL 特性(无特定顺序):

Like any Lisp dialect, Clojure draws a very fuzzy line between API and DSL and therefore the term doesn't hold the same mystique that it does in other languages. Lisp programmers tend to write their programs as layers of DSLs, each layer serving those above it. Having said that, here are a few that you could say display non-trivial levels of DSL-ness (in no particular order):

  • Enlive (HTML templating)
  • LazyTest (Unit testing)
  • fnparse (parser generator)
  • Midje (testing & mocking)
  • byte-spec (binary-formats)
  • Vijual (graph layout)
  • Trammel (constraint programming)
  • Cascalog (Hadoop w/ datalog syntax)
  • Incanter (R-like environment)
  • Sandbar (HTML sessions, forms, auth)
  • ClojureQL (SQL)
  • mini-kanren (embedded logic programming)
  • Leiningen (build tool)
  • sexpbot (IRC bot with plugin arch)

这篇关于是否有任何 Clojure DSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆