🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2702

Re: On whether C has first-class composable functions

#2702
From: Douglas E. Quale
Date: Sun, 27 Jan 1991 03:56
29 lines
2017 bytes
In article <3576:Jan2622:55:2991@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes:
>In article <1991Jan26.132913.11358@spool.cs.wisc.edu> quale@picard.cs.wisc.edu writes:
>> Show me an implementation that doesn't have a fixed limit on the number of
>> functions that can be composed.  The only portable C implementation 
>> demonstrated so far has an arbitrary limit compiled in.
>
>No. There have been at least seven implementations presented in this
>ongoing discussion, of which the first (mine) was a portable C
>implementation of first-class, dynamically allocated, composable
>functions.
>

My apologies Dan, I didn't save your code when it came by.  If you (or
anyone else, for that matter) still has a copy I would appreciate having
it emailed to me.

It's nonobvious to me how C can provide first-class dynamically allocated
functions.  First-class dynamically allocated composed functions should
look like function pointers because the functions that use them shouldn't
have to know that they were dynamically allocated.  And they especially
shouldn't have to know that they are composed.  Suppose I want to curry or
uncurry functions, or for instance provide a fun C f x y = f y x ?

If every use of a function parameter in the program has to know how the
function was created, this would seem to be a rather marginal definition
of first class.

-- Doug Quale
quale@picard.cs.wisc.edu
Technical Details
Message-ID: <1991Jan27.035619.24981@spool.cs.wisc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!zazen!uwvax!picard.cs.wisc.edu!quale
References: <305@smds.UUCP> <1991Jan26.132913.11358@spool.cs.wisc.edu> <3576:Jan2622:55:2991@kramden.acf.nyu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!zazen!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: <1991Jan27.035619.24981@spool.cs.wisc.edu>
Date: 27 Jan 91 03:56:19 GMT
References: <305@smds.UUCP> <1991Jan26.132913.11358@spool.cs.wisc.edu> <3576:Jan2622:55:2991@kramden.acf.nyu.edu>
Sender: news@spool.cs.wisc.edu (The News)
Organization: U of Wisconsin CS Dept
Lines: 29