🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2540

Re: Look, Ma, I can dynamically compose functions in C!

#2540
From: Dan Bernstein
Date: Fri, 21 Dec 1990 18:19
13 lines
1245 bytes
In article <553@ssp9.idca.tds.philips.nl> dolf@idca.tds.philips.nl (Dolf Grunbauer) writes:
> That is: he just wants to use the result of compose just like any other
> pointer to function, so one needs not to known whether it is a real function
> or a composed one. In Dan's code one must made this disctinction.

No, not at all! You just use all functions as struct fun's. It's
perfectly consistent. You can make struct fun's from (1) static
functions declared in your program and passed around as C function
pointers; (2) function composition; (3) whatever extensions you want to
add. And you call struct fun's in a single, absolutely consistent way.
What's the problem?

---Dan
Technical Details
Message-ID: <651:Dec2118:19:2090@kramden.acf.nyu.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven!adm!cmcl2!kramden.acf.nyu.edu!brnstnd
References: <1990Dec19.222059.6878@mathrt0.math.chalmers.se> <19468:Dec2100:23:0790@kramden.acf.nyu.edu> <553@ssp9.idca.tds.philips.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven!adm!cmcl2!kramden.acf.nyu.edu!brnstnd
From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
Newsgroups: comp.lang.misc
Subject: Re: Look, Ma, I can dynamically compose functions in C!
Message-ID: <651:Dec2118:19:2090@kramden.acf.nyu.edu>
Date: 21 Dec 90 18:19:20 GMT
References: <1990Dec19.222059.6878@mathrt0.math.chalmers.se> <19468:Dec2100:23:0790@kramden.acf.nyu.edu> <553@ssp9.idca.tds.philips.nl>
Organization: IR
Lines: 13