Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!linus!decvax!genrad!mit-eddie!barmar From: barmar@mit-eddie.UUCP (Barry Margolin) Newsgroups: net.lang Subject: Self-modifying code Message-ID: <1096@mit-eddie.UUCP> Date: Thu, 29-Dec-83 01:14:43 EST Article-I.D.: mit-eddi.1096 Posted: Thu Dec 29 01:14:43 1983 Date-Received: Fri, 30-Dec-83 00:42:57 EST References: sdccsu3.1420 <2656@yale-com.UUCP> Organization: MIT, Cambridge, MA Lines: 17 Most decent programming languages provide no way to create self-modifying code. The only high-level language that I know of that even has this concept is COBOL, and I think that it was removed in the infamous COBOL-80 standard; also, any particular implementation might choose not to implement this as self-modifying code. Only in assembler can you use self-modifying code and KNOW that you are actually gaining in performance by it, but who programs in assembler these days? Hmm, I just thought of a way to do self-modifying code in a very high-level language: interpreted Lisp. You can easily find the list structure that is the definition of the current function and splice into it. However, if efficiency is what you are after then you will have to compile your program, and then it stops working. -- Barry Margolin ARPA: barmar@MIT-Multics UUCP: ..!genrad!mit-eddie!barmar