Has anything useful come out of Intentional or ‘Language Oriented’ Programming?
This isn’t a rhetorical question. I’m looking for people who’ve tried these tools (ie. representing programs in some ‘higher level’ format than mere text and using different editors for different domain specific subsets) and have some comments about how it was, Or recommendations for good tools.
( http://www.onboard.jetbrains.com/is1/articles/04/10/lop/ , What exactly is Intentional Programming )
One very useful usage it to make test cases clearer, not only for the business analyst but for yourself/your team.
When time passes and you’ve forgotten what the exact test case was all about, having LOP is very helpful. You can have the spec at hand, and even document the rules in source code comments, but those artifacts don’t get executed. Code is!
You can also make the program very clear, but more clearer than a ‘language oriented’ description would be almost impossible.
Consider this fictional fragment.
NOTE Is not that java is LOP but there are some frameworks that whose intention is to do something like the following, that is, make a test case easier to follow.
This is a very simple example. The value in this code is the line that gets executed says what the test is all about:
That is very clear, it reads:
Well this is very simple. But you can have any kind of business rule an just read it literally.
Martin Fowler explains about this and mention Hamcrest a framework to do this.
Here’s the link ( I’m not completely sure if this where he talks about Hamcrest or is it another one 😛 sorry )