🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2700

Re: On whether C has first-class composable functions

#2700
From: Douglas E. Quale
Date: Sat, 26 Jan 1991 13:29
23 lines
1522 bytes
In article <305@smds.UUCP> sw@smds.UUCP (Stephen E. Witham) writes:
>
>Now to your challenge.  I think you COULD whip up something,
>using variable-argument functions, structures with type information in them,
>a garbage collector, etc., that would meet the letter of your challenge.
>It would be kind of painful, which I think is sort of your point.
>

We'll forget polymorphism.  With C it's hopeless.  (Hence C++).

>
>two incompatible data types, then you write two different functions.  Also,
>complex entities that are created at run time go into dynamically-allocated
>structures that have to be freed if you want the space back.  This is terrible?
>

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.  How do I
dynamically allocate function objects in C??

-- Doug Quale
quale@picard.cs.wisc.edu
Technical Details
Message-ID: <1991Jan26.132913.11358@spool.cs.wisc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwvax!picard.cs.wisc.edu!quale
References: <4408:Jan421:44:3391@kramden.acf.nyu.edu> <BBC.91Jan21120817@sicilia.rice.edu> <305@smds.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!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: <1991Jan26.132913.11358@spool.cs.wisc.edu>
Date: 26 Jan 91 13:29:13 GMT
References: <4408:Jan421:44:3391@kramden.acf.nyu.edu> <BBC.91Jan21120817@sicilia.rice.edu> <305@smds.UUCP>
Sender: quale@picard.cs.wisc.edu
Reply-To: quale@picard.cs.wisc.edu
Organization: U of Wisconsin CS Dept
Lines: 23