Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News Article: Domain Specific Languages in Erlang

Article: Domain Specific Languages in Erlang


Erlang is mostly known for reliability and for its concurrency and scalability concepts. But did you know that Erlang is a language well suited for writing DSLs?

In this article, Dennis Byrne guides you through a case study of creating a internal Domain Specific Language in the Erlang language.

From the article:

People are talking about Erlang. This talk is disproportionately about concurrency rather than any of the other powerful properties of the platform, such as reliability. This article is about a property of Erlang which does not get the credit it deserves - Erlang is a fantastic workbench for Domain Specific Languages. The domain I have chosen is investment finance. You will see how easy it is to translate plain English at runtime and execute it in the Erlang Runtime System. You may also learn a thing or two about functional programming.

Sounds interesting? Read the full article on Domain Specific Languages in Erlang.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Great article

    by Trung Nguyen,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Thanks for writing a great article ...

    However, there're some typos:
    . "Rule >- Rules" should be "Rule <- Rules"
    . "people with think twice" should be "people will think twice"

  • Memory leak when create function?

    by Shen Raymond,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Is it safe to create function run time? Just as atom, if too many atoms, the VM can crash because out of memory. Can ErLang VM clean up funs which no longer required?

    Thanks a lot.

  • Re: Memory leak when create function?

    by Max Bourinov,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    You can create up to 1M atoms in Erlang VM. Normally this is more that enough. If it is not enough it is a clear sign that you have bad program design. You cannot remove atoms at runtime.

    You cannot remove function in runtime directly, but with hot code update feature you can do so. But again, if you need it during program run - you should again think about program design.

    Putting it all together, I must say that Erlang is a perfect and very predictable platform for building huge scalable systems for huge load.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.