Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Domain-Specific and General Programming Languages

 
Tauri Valor
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

When we already have design patterns which describes and gives solutions to general problems, how well do the domain specific programming language serve the problem ?
I understand from wiki that Domain specific programming languages are not new, since they are not very popular until now I guess/assume that they are not very much acceptable as it may pose to be a paradigm shift for the programmers.

Correct me if Im wrong in my assumptions, Im trying to learn about Domain specific programming language as I've never heard about this before mentioning it in Javaranch.

Regards,
Tauri.
 
andrew ennamorato
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tauri Valor wrote:...since they are not very popular until now I guess/assume that they are not very much acceptable as it may pose to be a paradigm shift for the programmers.


From Martin Fowler's blog:
DSLs are very common in computing: examples include CSS, regular expressions, make, rake, ant, SQL, HQL, many bits of Rails, expectations in JMock, graphviz's dot language, FIT, strut's configuration file....


I'd say those are pretty popular. ;)
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tauri,

Think of DSLs as a "stealth" technology - sort of like Design Patterns. All the patterns in the GoF book were used long before they were recognized as design patterns. Similarly, as Andrew pointed out, we use DSLs (like XML) all the time, we just didn't know they could be considered DSLs.

Burk
 
Tauri Valor
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Andrew and Burk.

I was thinking of DSL something like a specific language for specific domains. Eg: Banking Specific DSL for Banking Domain which would consist of terminology, Keywords ,operators and other tokens more specific and easily understandable for Banking people and Banking domain experts.

Can we consider the above example as a DSL ?

Im trying to learn about DSL, please correct me when Im wrong.

 
Terence Parr
author
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tauri Valor wrote:I was thinking of DSL something like a specific language for specific domains. Eg: Banking Specific DSL for Banking Domain which would consist of terminology, Keywords ,operators and other tokens more specific and easily understandable for Banking people and Banking domain experts. Can we consider the above example as a DSL ?


Sure. First, a DSL is a computer language. If its syntax/semantics are tuned to make users efficient at a particular domain, it's a DSL not a general purpose language. ANT and data formats are DSLs too. Mathematica/matlab. You get the idea.
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tauri Valor wrote:I was thinking of DSL something like a specific language for specific domains. Eg: Banking Specific DSL for Banking Domain which would consist of terminology, Keywords ,operators and other tokens more specific and easily understandable for Banking people and Banking domain experts.

Can we consider the above example as a DSL ?


Makes sense to me. Neal Ford used the following as examples of DSLs in the "real" world:
* Venti, half-caf no foam latte with whip
* Scattered, smothered, and covered
* Just before the Tea Interval, the batsman was out LBW.

The first is from Starbuck's, the second for ordering hash browns (fried potatoes at Waffle House) and the third is from Cricket.

Burk
 
Tauri Valor
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Burk and Terence, Thanks again! keep enlightening me catch you in an another thread!!
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tauri,
You're welcome. I've been bouncing between the different DSL threads too. Lots of info but it's all spread out. Someone should consolidate this stuff and put it in a book...
Burk
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic