Programs that write programs

My current project includes a number of functions which write programs based in part on the user's input, although it is not actually intended for use by programmers.

Frankly this has been like wading thru glue even though I am not actually generating that much code.

It got me thinking about programs that write programs more generally.

Many years ago, there was some program (for the PET or Apple ][ or something) called "The Last One".  It was advertised widely to business users (not programmers) as being the last program that they needed to buy.  I never used the program, but the idea was, at least for certain kind of programs, the user filled out menus and stuff, and the program was written for him.  I do not know how well it worked.  Obviously it can not really have been the Last One literally, as people still write and buy other programs.

Another very loosely similar think I remember was some kind of Borland tool (Object something for Windows 3) which allowed the user to sort of drag out a flow chart, connect the boxes, and enter actions for the final program to do.  I do not think this can have been that successful, as it isn't still on the market as far as I know

I do realize that there are many RAD and CASE type tools which generate code, but they seem to be largely aimed at programmers rather than users. VB may be relatively easy, but give it too somebody with no interest in programming and no desire to write code ... and see how far they get.

So my question is why are end-user development tools so rare (or if not rare, rarely used by typical PC users)

- Is there no market for them? I find that a little hard to believe, talk to almost any computer user and there is nearly always some little utility or something they wish they could knock up, but they don't have the skills or time.

- Is it that the theory or technological obstacles are too hard?

- Is it an insoluble task because programs do something that software can not hope to emulate even with user guidance?