Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.lang.c Subject: Re: Partial application in C Summary: Sidebar on paridigms. Keywords: self-modifying code, generate-and-execute Message-ID: <2972@geac.UUCP> Date: 8 Jul 88 11:52:47 GMT Article-I.D.: geac.2972 References: <3353@cognos.UUCP> <619@goofy.megatest.UUCP> <429@uwovax.uwo.ca> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: GEAC Computers, Toronto, CANADA Lines: 32 In article <429@uwovax.uwo.ca> 16012_3045@uwovax.uwo.ca (Paul Gomme) writes: [discussion of execute-only code segments] > Besides, I thought that self-modifying code was (a) extremely difficult >to write, and (b) considered poor programming practice. Yes, it is and it is. What is really wanted here is architectural (and language) support of the "generate and execute" paradigm, which grew out of the old self-modifying-code techniques when a) people started using HLLs like lisp, and b) people started trying to deal with complex/unconstrained problems. What you tend to see now is something like the "sort generators" of the self-modifying-code era, except they're generators for all sorts of special-purpose functions. The architectural support should include the ability to write code to a logical segment, then make it executable (and normally read-only!), as mentioned early in this thread. The language support ranges from a facility to call something which one has a pointer to (C), to integrated compiler/interpreter sets (lisp, prolog, etc)... For obvious reasons, persons wanting to write the latter in the former want to be able to create such pointers, preferably without requiring language/OS changes. --dave ((lisp has (too many) (parentheses))) c-b -- David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb Geac Computers Ltd., | "His Majesty made you a major 350 Steelcase Road, | because he believed you would Markham, Ontario. | know when not to obey his orders"