integration - DSLs vs. Plain Old Libraries -


I was thinking about the question of DSL vs libraries recently. In my area, there is a problem with DSL (R, SAS and Matlab) is that they are a PITA to write another general purpose code and to integrate a PITA into more general purpose codes in other languages. I am not saying that is impossible, just annoying and disappointing

Contrast with this approach, for example, a sample, which runs on the top of the language of general purpose and is probably as good as Matlab if it has existed for a long time And the amount of money that was invested in it. This allows you to work on a project where there are only a few numbers without the need for a whole bunch of fierce gum codes for interfacing between languages, to remember many syntax etc.

Standalone DSL on a Plain Old Library for General Purpose? It seems that there is such obvious losses in terms of more difficult integration with more general purpose codes and there is another syntax to know that I do not understand why these DSLs are very popular. The main advantage of a standalone DSL is that it can be more expressive in writing a library in general purpose.

In, you are limited by language syntax. See an example of banking software, which has some financial records that can be questioned and you want to find all the mortgage issues last year. The pseudocode will look something like this for any common purpose:

  list & lt; Mortgage & gt; Mortgage this year = new linked list & lt; Mortgage & gt; (); (Mortgage meter: mortgage) {If today (min. (M.GetDet ()) & lt; = 1 year) {mortgage this year. (M);  

Now in a DSL, you can write something like this:

  Find all mortgages in the last year  

Moreover, bankers can build these questions on the basis of a "omnipresent language". (A domain of the domain which is common and makes it easy to interact with programmers and bankers).

Stand with DSL are not for very specific and general purpose. The language is more expressive and the syntax is generally more comfortable and related to the domain.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -