It's not a secret anymore!*
The moose likes IDEs, Version Control and other tools and the fly likes Creating Domain-Specific and General Programming Languages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Creating Domain-Specific and General Programming Languages" Watch "Creating Domain-Specific and General Programming Languages" New topic
Author

Creating Domain-Specific and General Programming Languages

Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
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.


A Moment's insight is sometimes worth a Life's experience.
andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100
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

Joined: Oct 01, 2001
Posts: 814
    
    3
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


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
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

Joined: Jan 13, 2010
Posts: 35
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

Joined: Oct 01, 2001
Posts: 814
    
    3
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

Joined: Aug 03, 2005
Posts: 166
Burk and Terence, Thanks again! keep enlightening me catch you in an another thread!!
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
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
 
subject: Creating Domain-Specific and General Programming Languages
 
Similar Threads
Making Software less complex
Embedded Scripting Languages: Success Stories? Jython?
Generic vs. DSL
SAP vs Java
* Welcome Terence Parr