Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which language (that runs on JVM) is best suited for creating a DSL?

We have a requirement to create complex fixed length and variable length Strings. These strings might represent a customer profile, an order etc. Which JVM based programming language do you guys suggest?

Idea is for a end user to create the strings using this DSL. So I am looking for validation, code completion etc.

like image 594
Aravind Yarram Avatar asked Jan 24 '11 04:01

Aravind Yarram


2 Answers

Groovy

http://docs.codehaus.org/display/GROOVY/Writing+Domain-Specific+Languages

like image 150
hhafez Avatar answered Sep 21 '22 15:09

hhafez


Use a Lisp that runs on the JVM. Some choices you have:

  1. Clojure
  2. JScheme
  3. SISC
  4. ABCL
  5. Bigloo (Does not run on the JVM but has good Java interoperability).

There is a good free book that explains how to use Lisp to design software bottom-up, i.e how to grow Lisp into a language that is ideal to solve the problem at hand.

Languages in the Forth family are also great for defining DSLs. There are a few that runs on the JVM:

  1. Niue
  2. Misty Beach Forth
like image 23
Vijay Mathew Avatar answered Sep 18 '22 15:09

Vijay Mathew