有没有Clojure DSLs? [英] Are there any Clojure DSLs?

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

问题描述

在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 DSLs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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