Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!hp4nl!charon!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.lang.misc Subject: Re: What ``first-class'' means in comp.lang.misc Message-ID: <2772@charon.cwi.nl> Date: 9 Jan 91 19:37:41 GMT References: <25449:Jan823:00:2991@kramden.acf.nyu.edu> <1991Jan9.061340.21668@d.cs.okstate.edu> Sender: news@cwi.nl Lines: 25 Here's a different opinion. You are all fighting over the wrong issue. As I read them, all those "definitions" of first-class don't really define it, but merely use a convenient term to convey a somewhat vague but useful idea which is then explained more precisely. The real problem with C functions (compared to Scheme or Lisp functions, for instance) is that their "closure" only contains global variables. This can be remedied by explicit closure parameters, and wrapper functions, but it still is a real nuisance if your programming style needs it a lot. It is even worse if you are using a library provided in object form only (no source) and there are interfaces that require you to pass a function pointer but don't allow you to pass an extra parameter for the closure -- you are forced to use globals which defeats reentrancy. On the other hand, the problem is no worse than the lack of built-in dynamic data structures (such as variable-size arrays) in C -- everybody knows how to roll their own, and for some this possibility is essential because it means they aren't stuck with a built-in feature that may be too slow or inflexible for a particular application. -- Guido van Rossum, CWI, Amsterdam "It's probably pining for the fiords"