Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: anonymous functions Message-ID: <4150@haddock.ISC.COM> Date: 23 May 88 22:42:51 GMT References: <5773@sigi.Colorado.EDU> <11325@mimsy.UUCP> <282@teletron.UUCP> <862@xyzzy.UUCP> <799@.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 17 In article <799@.UUCP> peter@ficc.UUCP (Peter da Silva) writes: >In article <862@xyzzy.UUCP>, throopw@xyzzy.UUCP writes: >> signal( SIGINT, void (int sig){ interrupted = 1; } ); >Of course if you went with this syntax instead of the typecast syntax, there's >no good reason to disallow: > signal ( SIGINT, void (sig) int sig; { interrupted = 1; } ); >After all, pre-ANSI declarations are still allowed. But they are obsolescent. They exist only for backward compatibility, which is not an issue when you're adding something new like anonymous functions. I'm not sure how easy it is to parse, anyway; I think I'd be satisfied with my earlier proposal: signal(SIGINT, remote(void (int sig), { interrupted = 1; })); ctime(&remote(long, 0)); Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint