Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Are custom DSLs in JavaScript still viable, Specifically ones written with Antler, Boo, or the former Microsoft Oslo?

With the proliferation of open source JavaScript/ECMAScript engines (V8, IronJS, etc.), does it make more sense to write the functionality needed into one of those instead of writing an entirely new language?

share|improve this question
    
by "custom DSL" are you referring to languages like CoffeeScript and ClosureScript? –  Brandon Satrom Aug 20 '11 at 13:58
    
No, I will update my question. –  Daniel A. White Aug 20 '11 at 15:36
    
Microsoft Oslo is "a set of software development and systems management tools", is it used somehow to develop DSL? Antler is a parser generator; lower level DSL implementations might require custom parsers, but they're not strictly necessary. Boo exposes features of the CLI that are interesting for programming language development or experimentation, but, again, only covers a subset of DSL work. Are you asking about the viability of a subset of DSLs, rather than the whole? –  blueberryfields Aug 20 '11 at 16:45

3 Answers 3

DSLs are rarely built as "entirely new" languages. Most of the practical DSLs are built on top of the existing languages - e.g., jQuery is a DSL on top of Javascript. And those DSLs are not necessarily embedded DSLs - they can be standalone as well, but compiled into a combination of the existing languages instead of going all the way down to the low level.

share|improve this answer

Custom DSL's are still viable, but you have other options which could be more or less complex depending on the problem you are trying to solve. For example you can implmeent DSLs using dynamic languages. (DSLs using Groovy is one example that comes to mind) Which can then be compiled or translated it yet other languages. This can have a lower upfront cost, but may you might fint that it is not be the right fit in your case .

Perhaps you should start with defining the domain in question, and put together a list of things you would need from a DSL.

share|improve this answer

If you mean DSL in strict terms, as in a programming language spec restricted to only one domain, then yes. The proliferation of the JavaScript/ECMAScript engines actually increases their viability - given a common virtual machine which is as flexible as the ECMAScript ones tend to be, DSL are both much easier to create, and likelier to be encountered.

What you won't see as much of, though, are languages with their own dedicated environments. At the high end, you'll see compilers to the existing languages (ala the Java to Javascript compiler that Google put out). Much more commonly, you'll see a library of supporting functions coupled with a programming language/style enforced by api restrictions and convention (the api to the jQuery library could be called a DSL).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.