Originally posted by Peter den Haan:
Template languages are another example, even though despite worthy aims most of them are a poor excuse for a programming language.
I am not sure what you call "template languages", maybe something entirely different from what I have in mind. I worked with Clarion, a template-based code-generation engine, before moving to Java. Since then I have a feeling that Java isn't quite an adequate development tool
Here is an old article about it.
Clarion "hides" great amount of code in its templates, and you as a programmer only have to
1) choose an appropriate template ("table", "form" to edit a record, "report"...)
2) substitute parameters (which file you want to edit, which index to use for sorting etc.)
3) "plug in" your own pieces of code to do something that isn't in a template.
Clarion provides a lot of places where you can add your code: before file content is shown, before a record content is shown, after user closed the window, after user pressed given key... You communicate with templates through GUI and all job is pure joy

We used templates that output code in Clarion language, but they had templates for C, Pascal, and maybe even Java, I am not sure.
We had a set of templates for a standard desktop application, and everything worked just fine until once we had to support hierarchical data and here standard templates weren't big help. Amount of "added" code probably exceeded amount of generated. We really should have thought about developing our own templates instead of misusing standard ones, but when you are in a "production mode" and all your code has to be written yesterday, you do not think, you code :roll:
An ideal variant would be to have one highly-qualified "template" developer in a team, who would analyze domain and modify/write new templates for the rest of gang. I believe that would speed up the development on an order of magnitude.
In my understanding, both a template-based and object-oriented approaches aim to achieve code reusability. OOA is more powerful, but it is
much more difficult to master.
Of course, really

thing would be to combine the best from both approaches: to keep all power and dynamics of OOA and to liberate a programmer from mundane coding. I did not think much in this direction, but I also have strong "gut feeling" that it is where enormous productivity gains and all fun is.
[ February 15, 2002: Message edited by: Mapraputa Is ]