🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2720

Re: Re^4: On whether C has first-class composable functions

#2720
From: Marc Sabatella
Date: Mon, 28 Jan 1991 22:53
18 lines
1529 bytes
>    >                                                         How do I
>    >dynamically allocate function objects in C??
>
>    Huh?  How do you dynamically allocate NON-function objects in C??
>    Answer: you use a library routine called malloc.  So, all you need is a
>    routine called "falloc" in your library...
>
>    While the implementation of falloc clearly can't be portable, the same
>    holds for malloc.

Oh come on, this is silly.  Besides the fact that it probably is in fact
possible to write malloc() in C if you are on a Unix machine (ie, you have
sbrk) despite handwaving about illegal pointer comparisons, there is a big
difference here.  The definition of malloc() is indeed portable - all standard
C's have a malloc() with the same semantics.  And the language defines a means
for you to put data into the newly allocated memory.  Neither of these is true
for "falloc" - there is no standard definition for such a routine, and even if
you wrote one, there is no way to compile code into falloc()'ed space.
Technical Details
Message-ID: <8960035@hpfcso.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!hplabs!hpfcso!mjs
References: <444@data.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!hplabs!hpfcso!mjs
From: mjs@hpfcso.HP.COM (Marc Sabatella)
Newsgroups: comp.lang.misc
Subject: Re: Re^4: On whether C has first-class composable functions
Message-ID: <8960035@hpfcso.HP.COM>
Date: 28 Jan 91 22:53:10 GMT
References: <444@data.UUCP>
Organization: Hewlett-Packard, Fort Collins, CO, USA
Lines: 18