tags:

views:

431

answers:

2

In our legacy system, we wrote our own VM to execute our internal DSL at run time. The in-house VM was designed to run our internal DSL only. We are in the process of rewriting our legacy application. One of the idea we are considering is, to transform our internal DSL to external DSL (C# or Java) and take advantage of their VM.

There are no clear guide lines when to write our own VM for our intenral DSL vs. transforming to external DSL and running it that VM.

+2  A: 

The internal DSL/VM vs. external DSL/VM decision is the same as all build vs. buy vs. download decisions. The guidelines are clear and the same for all software.

Why support your own VM, when someone else will support Java or Python for you?

Here's some clear guidelines. Note that these are the same guidelines for all software.

  1. Is it cheaper for you to continue to maintain your own software. In this case, DSL and VM?

  2. Is your own DSL and VM better than Java or Python? By "better", you must fill in any combination of quality factors: faster, smaller, more reliable, better features, less resource use, more auditable, more secure, etc.

Don't be confused by DSL and VM. It's nothing special; it's just more software.

S.Lott
+1  A: 

It is definitely not an anti-pattern. External DSLs have many advantages compared to the internal ones. Independence from the host language or implementation platform in your case is one of them. Other benefits are better syntax flexibility, possibility to use model driven approches like model transformations, model viewing and others.

The0retico