Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!otter!kers From: kers@otter.hple.hp.com (Christopher Dollin) Newsgroups: comp.arch Subject: Re: Re: Programmed code generation (was: Self-modifying code) Message-ID: <780009@otter.hple.hp.com> Date: 15 Jul 88 08:06:53 GMT References: <12381@ut-sally.UUCP> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 33 Ed Nather says (starting with a quote): | In article <5262@june.cs.washington.edu>, pardo@june.cs.washington.edu | (David Keppel) writes: | > | > Let me rephrase my position. There is nothing architecturally weird | > about programs that generate their own code. Doing so does not cause | > any problems on any machines that I am aware of, although few | > OPERATING SYSTEMS support this. | > | | And no LANGUAGES that I'm aware of. But that's the whole point. CAN they? Pop11 and its predecessors Pop2, Pop10. In Pop11 the compiler is a bunch of procedures that user programs can call to plant code which is then runnable by those same user programs. But then that's what you expect in an incremental programming environment. In Poplog (the "home ground" of Pop11), the compiler procedures are also accessible from the other languages of the system - Common Lisp, Prolog, ML. The "other" languages are implemented using those same compiler routines. The shared virtual machine language is translated to native code in most Poplog implementations. "All" it takes to move the system is for the bottom level to be ported - the rest of the compilers move for free. So languages exist in which programs can generate "their own code". It's not even peculiar to do so. Regards, Kers. | "If anything anyone lacks, they'll find it all ready in stacks". PS. The recent "partial application in C" debate in comp.wahtever was interesting as partial application is another Pop11 primitive procedure .....