WG211/M3VisserDiscussion

From WG 2.11
Jump to: navigation, search


Eelco Visser

Title: Is program generation here to stay?
Discussion Leader: Eelco Visser
Abstract:

Is program generation a fundamental tool for software engineering or is it a crutch to help users of disfunctional programming languages?

Consiser this quote from an [interview] on Code Generation Net with Dave Thomas

CGN: What do think the future is for code generation?

Dave: I think that in the long term the larger code generation efforts, the "application generators," will become a thing of the past. They are there because the underlying technologies and architectures don't yet support programming at a high level. But I'm betting that languages such as Java and C++ will in the long term be seen as a curious branch in the evolution of computing. I'm hoping that somewhere out there some bright spark is coming up with a way of letting us write applications expressively and dynamically. Once this happens, the need for these kinds of code generators will diminish.

For example, I rarely (if ever) write a code generator that generates Ruby code: there's just no need, as Ruby is dynamic enough to let be do what I want without leaving the language.

In the shorter term, though, I think code generators of all kinds will continue to contribute significantly to the industry. Java and C# are both such stifling languages that you need to be able to use code generators to make them effective.

So the thesis is: better abstraction mechanisms make program generation obsolete.

In this discussion I would be interested in arguments for or against this thesis. Preferably such arguments should be illustrated with evidence (examples)

  • successful applications of code generation, especially those that are are here to stay
  • abstractions that make generation obsolete

A followup question might be: If generation is (temporarily) useful, how important is it to have static guarantees about generators such as syntactic or type correctness of the output programs? Many text-based program generation techniques flourish apparently without suffering from the problem that they do not provide such guarantees.

5-min position statements are invited. Send proposals to [| Eelco ].

[WalidTaha]: Eelco, nice discussion topic! For me it depends on how you define program generation. There are concrete aspects (like using "printf" somewhere in your "generator"), and there are much more abstract aspects (like "evaluation under lambda"). MSP, for example, is already a framework were evaluation under lambda is built into the language, and you don't have to leave the language.