NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Several months ago, Sergey Dmitriev, CEO of JetBrains,
published an article
that made a big claim:
Today's mainstream approach to programming has some crucial built-in assumptions which hold us back like chains around our necks, though most programmers don’t realize this. With all the progress made so far in programming, we are still in the Stone Age. We’ve got our trusty stone axe (object-oriented programming), which serves us well, but tends to chip and crack when used against the hardest problems.
The solution he proposed, Language Oriented Programming (LOP), sparked some controversy: Abandon text-based languages, create languages instead of class libraries, integrate editors with the languages they edit, allow any programmer to modify the programming language, etc.
Several people expressed their doubts, and while the tool in the article remained vaporware, Dmitriev remained mostly silent. That is, until today when
he opened the tool up for early access
:
After months of intense development, it is finally here! The new language workbench, code-named the
Meta-Programming System
(MPS), has been
opened to public review
in JetBrains' renowned Early Access Program (EAP).
To top all that off, there has been work at Microsoft called Software Factories, new activity from Intentional Software (Charles Simonyi's company), and several others, showing that Language Oriented Programming is gaining momentum.
What will the future bring? Are we headed in the right direction? Will we all be programming in language workbenches in 5 years? What will happen to Java? Will it become
the next Fortran
? Or is this all just the 'next big thing that never happens'?
Re: Will Language Oriented Programming revolutionize software development?
The Pragmatic Programmers have a nice article where they say: don't design an application, instead:
Design a domain specific "language" that can be used to talk about applications in this domain.
http://www.pragmaticprogrammer.com/ppllc/papers/1998_03.html
In that article they quote an old Bell proverb that says:
Library design
is
language design.
Seems like LOP is basically an acronym for "Writing code the way any sensible developer has been doing it for the past 20-30 years."
Anyway, Sergey finally admits this all: "Class libraries are wannabe DSLs".
So there we have it: nothing new here. Only something better. That's progress, but not revolutionary.
Re: Will Language Oriented Programming revolutionize software development?
It's not Lisp. See the section of Martin Fowler's Language Workbenches article about
'Internal DSLs'
, and compare it with the section about how language workbenches
alter the trade-offs
.
Re: Will Language Oriented Programming revolutionize software development?
What would you consider 'revolutionary'? Were assembly languages revolutionary? Were compiled languages revoutionary? Was structured programming revolutionary? How about object-oriented programming?
Re: Will Language Oriented Programming revolutionize software development?
I looked at the links, tho I did not study them in detail.
> It's not Lisp.
Yea, it is. It just has a fancy structure editor tacked on top of it (the Lisp Machines had Structure editors, but for assorted reasons, they haven't survived).
All of this cruft to, what, save a few parentheses?
This is a DSL I wrote (in Lisp -- obviously, this is all Lisp Macros). In this case, it defines a series of tasks (messages), with different parts (sub-tasks) that are sent based on whether variables are set.
Do they look dramatically different? The Lisp has parens and prefix. Beyond that? Not really.
That DSL inevitably gets compiled into Java source code. The foundations of that DSL, including the compiler, took me a WEEK, and I have a basic working knowledge of Lisp. I needed little more than Lists and Macros, and Print. That was my first "DSL".
I did have some experience writing other languages, however, and the overall task took obviously more than a week, just like it would for any moving target.
When Paul Graham's company wrote ViaWeb, they wrote most of their pages in a Lisp based markup language, and rather than using parentheses, they used white space ala Python. It would be similar effort to convert to infix instead of prefix expressions.
Prefix is not intolerable. Parentheses are not intolerable. This is a AWFUL LOT of work to get around parens and prefix and a text editor.
And you know what? It won't work either.
Domain experts don't use DSLs because they don't want to or can not understand the extremely complicated intricacies of the underlying implementation that comes around and inevitably bites them in the butt.
How many times have you had a clerk, or the Order Entry department manager come to you confused at the status of an order, and then have to show the clerk or manager how to key the order properly for the system to process it correctly? And that's a basic "fill in the blanks" kind of exercise, and "simply" a matter of filling in the right blanks with the right bits.
The problem has never been the syntax. The problem is simply that the domain experts are not programmers, nor are they experts in the system they're using -- and they don't want to be. They just want to "use" it. Like an ATM.
Millions of people haven't a clue how they work. Many even struggle with them, but mostly they're simple enough to operate that you don't need to understand how they work.
When the system is that simple, then the task becomes simply Data Entry, and you don't need a Domain Expert anymore. When you need a Domain Expert coding your system, regardless of the language, Java, BASIC, Excel Formulas, or a contrived DSL, then they need to soon become very well versed in how that system works.
That's where the rubber meets the road, and that's what makes DSLs extremely difficult to create. Make them to simple, and you may as well get a clerk to key them in, because you don't want to pay the Domain Expert for that kind of base labor.
Make it more rich and your Domain Expert is now a systems programming expert for your system, which they don't want to be. "Let me just tell you what to do, and you figure it out."
It has nothing to do with parentheses or structure editors or whatever.
Now, to be fair, the most popular DSL on the planet is basically Excel, and folks have warped that tool in innumerable ways. That's because it's very general purpose and simple scripting is very simple (not to mention transparent -- change a cell, and Magic Happens), and the domain users get to basic key their domain into the little boxes. But when the domain is being implemented behind a facade of a DSL, it becomes less general purpose and a lot more picky about what it takes, how it takes it, what it does with it, etc. Because computers are intrinsically picky beasts.
Still, there's 10000 pages of books written on how to key forumla into Excel, and most users get little beyond C1 + D1 or SUM(A1:A21).
So, not to be a total cynic, but LOP is no panacea in any way shape or form and it's neither novel nor new.
Re: Will Language Oriented Programming revolutionize software development?
"I looked at the links, tho I did not study them in detail."
Maybe you should.
"Do they look dramatically different? The Lisp has parens and prefix. Beyond that? Not really."
It's not about how they look. Lisp is text-based, and that limits what it's capable of in terms of tool integration. This is discussed in the Fowler article (the links I mentioned). It's a good article, and not that long.
"Domain experts don't use DSLs because they don't want to ..."
Some LOP approaches, notably Software Factories, are about making programming accessible to domain experts. However, MPS is not about that. MPS is about programmer productivity (think of IntelliJ IDEA). It's about giving power, choice, and freedom back to programmers.
"I did have some experience writing other languages ... LOP is neither novel nor new."
Depends who you talk to. For you, it is familiar; you have experience with it already. However, most people are not aware of it, so it is certainly novel. LOP as a technique has been around a long time, so you are right it's not 'new'. But the language workbench approach to LOP is most definitely new.
if you read the article from Martin Fowler above carefully, he actually has the same view about the things with you (About Excel, etc.).
IMO, we (programmers) are always searching for some new ways to make us more productive and that's the reason of this topic... I agree completely with your opinion about all the "users" (ATM, VB, Excel - maybe an addition: SAP ABAP). They also want to be productive, so what they need is very good GUIs and all these GUIs are also DSLs for them!
Excel is very successful because it has a very good GUI (DSL) for all the business users...
It is for sure a new thing as today we are able to *easily* build our own language. You don't have to be a compiler developer to build your own DSL. Anyway the question we need to answer is how will this impact the quality of the language? Example:
-> VB is very easy, everyone can write VB apps -> quality of the apps?, maintenance?
-> If every single programmers build their own DSLs -> maintenance, qualitiy?
Re: Will Language Oriented Programming revolutionize software development?
Well, I'm not Serge, but yes, macros do entail their fair share of horror. The problem lies in the fact that they create leaky abstractions. Yes you can write elegant DSL's, but as soon as you want to use the debugger, you're back into the raw code (not to speak of code-assist).
The problem is that the language used to define the DSL is too powerful, the transformations back and forth between the different (meta-)levels cannot be interpreted by the various tools.
The LOP stuff aims to enable the creation of seamless DSL's. I take seamless to mean at least language aware editing (a la Eclipse/IDEA), debugging, profiling and cross referencing. All this consistently within the model of the DSL (i.e. no dropping back into the meta-language).
I wish them luck, but it's a tall order. The interesting bit here is that all the projects Martin Fowler mentions come out of private enterprises, not academia. I guess them PhDs are all using vi (or emacs, for that matter), harrrr
Note the approach taken by Sergey is to use a DSL as the base infrastructure to write other DSL's. While that is nicely elegant and will get you extra points with the professor, it's by no means the only way to do it. Eclipse, for example, tries to factor out common language-tool infrastructure into the "ltk", the language toolkit. It's simply a Java library.
Disclaimer: I used to work for IBM OTI (creators of Eclipse), while Rob Harwood works for JetBrains, so caveat emptor:-)
I appreciate that he must put a lot of work on this, and it is interesting that a company allows research like this. Bravo for that.
But for the concept, I do not see that gain in defining languages ! It will become like XML vocabularies, an incredible mess.
Also it will means that nobody will easily understand somebody else program.
Yes OOP has drawbacks, when you add AOP it becomes much better and seems a much more promising avenue.
This is like another UML, while nice to describe programs, it is another thing to build programs with it.
I think it is far from simplifying the work ! On the contrary.
Also it is totally unrealistic to believe that a large percentage of programmers will be at ease creating all kind of "pseudo languages". Yes we write objects to emulate the project space and in a way is sometimes similar to a small language, but I fail to see any gain with this paradigm.
Will Language Oriented Programming revolutionize software development?
URL: JetBrains
At 3:11 PM on Jun 16, 2005, Rob Harwood
wrote:
Fresh Jobs for Developers Post a job opportunity
The solution he proposed, Language Oriented Programming (LOP), sparked some controversy: Abandon text-based languages, create languages instead of class libraries, integrate editors with the languages they edit, allow any programmer to modify the programming language, etc.
Several people expressed their doubts, and while the tool in the article remained vaporware, Dmitriev remained mostly silent. That is, until today when he opened the tool up for early access :
There is also a "Hello, World!" tutorial available. MPS is still very much in its prototype stage, but Martin Fowler was able to use it to write an article about "language workbenches" in general, and a related article about MPS specifically.
To top all that off, there has been work at Microsoft called Software Factories, new activity from Intentional Software (Charles Simonyi's company), and several others, showing that Language Oriented Programming is gaining momentum.
What will the future bring? Are we headed in the right direction? Will we all be programming in language workbenches in 5 years? What will happen to Java? Will it become the next Fortran ? Or is this all just the 'next big thing that never happens'?
38 replies so far (
Post your own)
Re: Will Language Oriented Programming revolutionize software development?
The Pragmatic Programmers have a nice article where they say: don't design an application, instead:Design a domain specific "language" that can be used to talk about applications in this domain.
http://www.pragmaticprogrammer.com/ppllc/papers/1998_03.html
In that article they quote an old Bell proverb that says:
Library design is language design.
Seems like LOP is basically an acronym for "Writing code the way any sensible developer has been doing it for the past 20-30 years."
Anyway, Sergey finally admits this all: "Class libraries are wannabe DSLs".
So there we have it: nothing new here. Only something better. That's progress, but not revolutionary.
Re: Will Language Oriented Programming revolutionize software development?
Oh, give me a break!Let me be the first Common Lisp troll to mount the pulpit and scream, Greenspuns 10th Law waved high in my clenched fist, "Been there, done that".
This Latest Programming Revolution brought to you by Common Lisp ca. 1975.
Oh, and cue Serge to come in and decry the horror of macros.
Re: Will Language Oriented Programming revolutionize software development?
It's not Lisp. See the section of Martin Fowler's Language Workbenches article about 'Internal DSLs' , and compare it with the section about how language workbenches alter the trade-offs .Re: Will Language Oriented Programming revolutionize software development?
What would you consider 'revolutionary'? Were assembly languages revolutionary? Were compiled languages revoutionary? Was structured programming revolutionary? How about object-oriented programming?Re: Will Language Oriented Programming revolutionize software development?
I looked at the links, tho I did not study them in detail.> It's not Lisp.
Yea, it is. It just has a fancy structure editor tacked on top of it (the Lisp Machines had Structure editors, but for assorted reasons, they haven't survived).
All of this cruft to, what, save a few parentheses?
(def-task (BP-CM :prefix BP :to CM) (task-group (A) (sub-task 1-CMTsk :alias MSG.BP_A1_CMTsk :when (and (cmd) (in hxHtn ("N" "U")) (== Meds_Anti_HT "N") (in BP_Current_Test ("N" "U")))) (sub-task 2-CMTsk :alias MSG.BP_A2_CMTsk :when (and (cmd) (== hxHtn "Y") (== Meds_Anti_HT "N") (in BP_Current_Test ("N" "U")))) (task-group (B1) (sub-task 1-CMTsk :when (and (cmd) (== Meds_Anti_HT "N") (== BP_Current_Test "Y") (== BP_Range_Category "N"))) (sub-task 2-CMTsk :when (and (cmd) (== Meds_Anti_HT "N") (== BP_Current_Test "Y") (== BP_Range_Category "HN") (== BP_Self_Check_Results "N")))))This is a DSL I wrote (in Lisp -- obviously, this is all Lisp Macros). In this case, it defines a series of tasks (messages), with different parts (sub-tasks) that are sent based on whether variables are set.
Now, compare that to Agreement DSL found at http://martinfowler.com/articles/mpsAgree.html
Do they look dramatically different? The Lisp has parens and prefix. Beyond that? Not really.
That DSL inevitably gets compiled into Java source code. The foundations of that DSL, including the compiler, took me a WEEK, and I have a basic working knowledge of Lisp. I needed little more than Lists and Macros, and Print. That was my first "DSL".
I did have some experience writing other languages, however, and the overall task took obviously more than a week, just like it would for any moving target.
When Paul Graham's company wrote ViaWeb, they wrote most of their pages in a Lisp based markup language, and rather than using parentheses, they used white space ala Python. It would be similar effort to convert to infix instead of prefix expressions.
Prefix is not intolerable. Parentheses are not intolerable. This is a AWFUL LOT of work to get around parens and prefix and a text editor.
And you know what? It won't work either.
Domain experts don't use DSLs because they don't want to or can not understand the extremely complicated intricacies of the underlying implementation that comes around and inevitably bites them in the butt.
How many times have you had a clerk, or the Order Entry department manager come to you confused at the status of an order, and then have to show the clerk or manager how to key the order properly for the system to process it correctly? And that's a basic "fill in the blanks" kind of exercise, and "simply" a matter of filling in the right blanks with the right bits.
The problem has never been the syntax. The problem is simply that the domain experts are not programmers, nor are they experts in the system they're using -- and they don't want to be. They just want to "use" it. Like an ATM.
Millions of people haven't a clue how they work. Many even struggle with them, but mostly they're simple enough to operate that you don't need to understand how they work.
When the system is that simple, then the task becomes simply Data Entry, and you don't need a Domain Expert anymore. When you need a Domain Expert coding your system, regardless of the language, Java, BASIC, Excel Formulas, or a contrived DSL, then they need to soon become very well versed in how that system works.
That's where the rubber meets the road, and that's what makes DSLs extremely difficult to create. Make them to simple, and you may as well get a clerk to key them in, because you don't want to pay the Domain Expert for that kind of base labor.
Make it more rich and your Domain Expert is now a systems programming expert for your system, which they don't want to be. "Let me just tell you what to do, and you figure it out."
It has nothing to do with parentheses or structure editors or whatever.
Now, to be fair, the most popular DSL on the planet is basically Excel, and folks have warped that tool in innumerable ways. That's because it's very general purpose and simple scripting is very simple (not to mention transparent -- change a cell, and Magic Happens), and the domain users get to basic key their domain into the little boxes. But when the domain is being implemented behind a facade of a DSL, it becomes less general purpose and a lot more picky about what it takes, how it takes it, what it does with it, etc. Because computers are intrinsically picky beasts.
Still, there's 10000 pages of books written on how to key forumla into Excel, and most users get little beyond C1 + D1 or SUM(A1:A21).
So, not to be a total cynic, but LOP is no panacea in any way shape or form and it's neither novel nor new.
Re: Will Language Oriented Programming revolutionize software development?
"I looked at the links, tho I did not study them in detail."Maybe you should.
"Do they look dramatically different? The Lisp has parens and prefix. Beyond that? Not really."
It's not about how they look. Lisp is text-based, and that limits what it's capable of in terms of tool integration. This is discussed in the Fowler article (the links I mentioned). It's a good article, and not that long.
"Domain experts don't use DSLs because they don't want to ..."
Some LOP approaches, notably Software Factories, are about making programming accessible to domain experts. However, MPS is not about that. MPS is about programmer productivity (think of IntelliJ IDEA). It's about giving power, choice, and freedom back to programmers.
"I did have some experience writing other languages ... LOP is neither novel nor new."
Depends who you talk to. For you, it is familiar; you have experience with it already. However, most people are not aware of it, so it is certainly novel. LOP as a technique has been around a long time, so you are right it's not 'new'. But the language workbench approach to LOP is most definitely new.
Re: Will Language Oriented Programming revolutionize software development?
After reading the hello world tutorial all I have to say is: argggg!Right now I don't see how this stuff can be usefull
Re: Will Language Oriented Programming revolutionize software development?
> It's about giving power, choice, and freedom back to> programmers.
erm, when were they taken away, and by whom? did I miss something?
christian
DSL, Excel, ...
Will,if you read the article from Martin Fowler above carefully, he actually has the same view about the things with you
IMO, we (programmers) are always searching for some new ways to make us more productive and that's the reason of this topic... I agree completely with your opinion about all the "users" (ATM, VB, Excel - maybe an addition: SAP ABAP). They also want to be productive, so what they need is very good GUIs and all these GUIs are also DSLs for them!
Excel is very successful because it has a very good GUI (DSL) for all the business users...
It is for sure a new thing as today we are able to *easily* build our own language. You don't have to be a compiler developer to build your own DSL. Anyway the question we need to answer is how will this impact the quality of the language? Example:
-> VB is very easy, everyone can write VB apps -> quality of the apps?, maintenance?
-> If every single programmers build their own DSLs -> maintenance, qualitiy?
Cheers,
Lofi.
EJOSA - OpenUSS
Re: Will Language Oriented Programming revolutionize software development?
Regardless of the pros and cons of MPS, hats off for JetBrains for daring to head new directions. We are still far off being a mature industry.Re: Will Language Oriented Programming revolutionize software development?
Well, I'm not Serge, but yes, macros do entail their fair share of horror. The problem lies in the fact that they create leaky abstractions. Yes you can write elegant DSL's, but as soon as you want to use the debugger, you're back into the raw code (not to speak of code-assist).The problem is that the language used to define the DSL is too powerful, the transformations back and forth between the different (meta-)levels cannot be interpreted by the various tools.
The LOP stuff aims to enable the creation of seamless DSL's. I take seamless to mean at least language aware editing (a la Eclipse/IDEA), debugging, profiling and cross referencing. All this consistently within the model of the DSL (i.e. no dropping back into the meta-language).
I wish them luck, but it's a tall order. The interesting bit here is that all the projects Martin Fowler mentions come out of private enterprises, not academia. I guess them PhDs are all using vi (or emacs, for that matter), harrrr
Note the approach taken by Sergey is to use a DSL as the base infrastructure to write other DSL's. While that is nicely elegant and will get you extra points with the professor, it's by no means the only way to do it. Eclipse, for example, tries to factor out common language-tool infrastructure into the "ltk", the language toolkit. It's simply a Java library.
Disclaimer: I used to work for IBM OTI (creators of Eclipse), while Rob Harwood works for JetBrains, so caveat emptor:-)
I do not think so.
I appreciate that he must put a lot of work on this, and it is interesting that a company allows research like this. Bravo for that.But for the concept, I do not see that gain in defining languages ! It will become like XML vocabularies, an incredible mess.
Also it will means that nobody will easily understand somebody else program.
Yes OOP has drawbacks, when you add AOP it becomes much better and seems a much more promising avenue.
This is like another UML, while nice to describe programs, it is another thing to build programs with it.
I think it is far from simplifying the work ! On the contrary.
Also it is totally unrealistic to believe that a large percentage of programmers will be at ease creating all kind of "pseudo languages". Yes we write objects to emulate the project space and in a way is sometimes similar to a small language, but I fail to see any gain with this paradigm.
Re: Will Language Oriented Programming revolutionize software development?
Well you should be surprised.I totally agree with you.
It won't succeed. It is not at all as easy as they make it to be. And yes it has been tried, your example is to the point.
But I do
> But for the concept, I do not see that gain in> defining languages ! It will become like XML
> vocabularies, an incredible mess.
Treat it as the ability to change a language, e.g. to add some useful stuff you need to better solve your problem to Java.
Tom