Ruby and Python
Rainer Deyke
root at rainerdeyke.com
Mon Nov 20 21:20:38 EST 2000
"James Logajan" <JamesL at Lugoj.Com> wrote in message
news:3A19BFCC.4DF9EA3 at Lugoj.Com...
> Gareth McCaughan wrote:
> > I wouldn't say that C has first-class functions. You can't
> > in any sense make them at runtime, most notably.
>
> Sure you can. I thought everyone knew how to do that. Just because people
> don't do it much these days doesn't mean its not possible.
>
> Never could figure out why it was okay in Lisp and other fancy-pants
> languages to do self-modifying code but not in C or assembler....
It is possible to write self-modifying code in assembler. It is *not*
possible to write self-modifying code in C without relying on undefined
behavior. There is no guarantee that pointers to functions can be converted
to or from pointers to data (including pointers to void).
--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
More information about the Python-list
mailing list