Do we really need Domain Specific Languages ?




One of the features of DSLs often cited is enabling non programmers to write "computer programs" in near natural language.

So for example business people or final users will be able to write requirements for a software application in plain English and developers will be able to "run" the requirements just like a computer program that test and verify  the application against the requirements.
Well, not in plain English, but at least in a way easier to understand to business people or final users than the current alternative e.g. FitNesse.

Michael Feathers points out that even when using a natural language to program a computer it seems easier, it does read better, but you still have to think like a programmer!
So it looks like natural languages are not the key point.

And then, do real people really have an hard time learning computer programming? Say a musician, an accountant, a painter, a sociologist, a psychologist, a biologist or a doctor ?







So people is capable of learning computer programming more that we (computer programmers) think when they have valuable reasons to do so. For this purpose DSLs imho are not essential, they just add more complexity.







[1] Processing is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists. Is an open project initiated by Ben Fry and Casey Reas. It evolved from ideas explored in the Aesthetics and Computation Group at the MIT Media Lab.

[2] Openframeworks is a c++ library designed to assist the creative process by providing a simple and intuitive framework for experimentation.

[3]
NetLogo is a programmable modeling environment for simulating natural and social phenomena. It was authored by Uri Wilensky in 1999 and is in continuous development at the Center for Connected Learning and Computer-Based Modeling. NetLogo is particularly well suited for modeling complex systems developing over time. These simulations address many content areas in the natural and social sciences, including biology and medicine, physics and chemistry, mathematics and computer science, and economics and social psychology.

Print | posted @ domenica 11 ottobre 2009 23.10

Comments on this entry:

Gravatar # re: Do we really need Domain Specific Languages ?
by Nicolò Carandini at 12/10/2009 3.02

Post molto interessante, non avevo mai riflettuto su questo aspetto. Grazie!
  
Gravatar # re: Do we really need Domain Specific Languages ?
by Paolo "Nusco" Perrotta at 16/10/2009 12.20

Io pensavo che fosse un'ottima idea usare i DSL per interagire con gli utenti. In pratica ho visto che quest'idea spesso fallisce. Però ho l'impressione che fallisca per motivi diversi da quelli che hai scritto: non perché i clienti trovino più facile imparare un linguaggio general-purpose, ma perché proprio non hanno nessuna intenzione di programmare, DSL o non DSL.

Sono d'accordo che esistano più persone che potrebbero imparare a programmare di quante non pensino molti programmatori - ma tra poterlo fare e farlo davvero, ce ne corre. (E si capisce: non è mica il loro lavoro).

Lasciami anche criticare due dei tuoi esempi. Non credo che il successo di VB sia iniziato con le macro di Excel - VB è nato come un linguaggio 4GL per risolvere il problema delle GUI, e si è allargato da lì. Quanto a Brian Eno, basta leggere una sua intervista per capire che è un megageek peggio di me e te, quindi assai poco rappresentativo della media dei musicisti. Se mi passi la riduzione all'assurdo, esistono anche pornostar iscritte al MENSA, ma questo non dice molto sul rapporto tra QI e potenza sessuale.

A parte tutto (e per andare off topic), trovo che i DSL siano utilissimi agli sviluppatori, e qui gli esempi di successo sono onnipresenti.
  
Gravatar # re: Do we really need Domain Specific Languages ?
by Luca Minudel at 17/10/2009 10.43


> A parte tutto (e per andare off topic), trovo che i DSL siano utilissimi agli sviluppatori, e qui gli esempi di successo sono onnipresenti.


intendi quelli citati anche da Antonio Terreno come (N)ant o SQL o Linq ?

  
Gravatar # re: Do we really need Domain Specific Languages ?
by Paolo "Nusco" Perrotta at 17/10/2009 13.48

>intendi quelli citati anche da Antonio Terreno come (N)ant o SQL o Linq ?

Quelli, e tutti gli altri linguaggi "non general-purpose" (la shell di Linux, VBA, AppleScript, ...), oltre agli Internal DSL e alle API o ai framework che diventano praticamente linguaggi a sè stanti (RSpec, Rhino Mocks, Rails, ...). E naturalmente, tutti i "linguaggi emergenti" che ci scriviamo da soli facendo design. :)
  

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 1 and 5 and type the answer here: