Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!uwvax!picard.cs.wisc.edu!quale From: quale@picard.cs.wisc.edu (Douglas E. Quale) Newsgroups: comp.lang.misc Subject: Re: On whether C has first-class composable functions Message-ID: <1991Feb6.161639.18311@spool.cs.wisc.edu> Date: 6 Feb 91 16:16:39 GMT References: <29224:Feb419:06:0191@kramden.acf.nyu.edu> <1991Feb5.144815.23239@spool.cs.wisc.edu> <1234:Feb520:27:2391@kramden.acf.nyu.edu> Sender: news@spool.cs.wisc.edu (The News) Organization: U of Wisconsin CS Dept Lines: 26 In article <1234:Feb520:27:2391@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: > >As I said at the beginning of this discussion, you're wrong. The very >first implementation posted (mine) dynamically allocated the composed, >first-class functions. I'm quite certain that you are completely, absolutely and undisputedly wrong. Functions cannot be dynamically allocated in C. C does not have first-class functions. If arrays and structures couldn't be dynamically allocated in C, would you call C arrays and structs first class? The comparison between C arrays and functions is interesting: If C arrays were limited to the same allocations permitted to functions, all arrays would be global static variables and no more arrays could be created at runtime. I have serious doubts about whether you would know what to do with dynamically allocated functions if you had them. -- Doug Quale quale@picard.cs.wisc.edu