Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: C String terminator
Date: Thu, 09 Apr 2020 07:23:49 -0700
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <868sj4n3ey.fsf@linuxsc.com>
References: <875zepvvu1.fsf@nosuchdomain.example.com> <86sghl6eop.fsf@linuxsc.com> <61f8fb26-45fb-46c4-8bf4-d85d8fb94a8d@googlegroups.com> <86a73tpb20.fsf@linuxsc.com> <2a770f28-0124-4b7e-8da3-24c05dd75636@googlegroups.com> <5f11e9cb-67df-4c87-bab1-c7272ccf3ebc@googlegroups.com> <874ku09ssw.fsf@bsb.me.uk> <6bf35dde-de1f-4635-a69d-4d4860d84a29@googlegroups.com> <877dywqhtv.fsf@nosuchdomain.example.com> <13e81aac-375b-45ba-9261-8153c406368c@googlegroups.com> <09e137e8-7bf0-4b5b-b098-52f31bfdfe64@googlegroups.com> <0838cd07-3924-4e2f-b706-52f54ad60ba2@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="bedbb4a28902cd1137b240ce253aab81"; logging-data="24593"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6xmmelQi0OYRuxQlwn3JKl7ztqDVnDjM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:GQrDsamSmfqn+Yet9/uStJYL650= sha1:7T6nlIhq/gvrDl83oukG6aMJolI=
Xref: csiph.com comp.lang.c:151259
Guillaume writes:
> Le 06/04/2020 at 11:25, Malcolm McLean a ecrit:
>
>> The hypothetical language would make it impossible to write rand()
>> with the C interface, so it would be obvious what I am talking about.
>> Globals muddy the water, make it more difficult for people to grasp
>> what is going on, prevent us from using the term "pure function"
>> which I think even Keith wouldn't object to.
>
> Agreed.
>
> I think a typical way of implementing a rand-like function in a
> typical "functional" language would be with a "closure" (although some
> may argue that closures are monsters that shouldn't belong to
> functional languages, so YMMV.)
It's hard to imagine any serious functional programming without
closures. Were you perhaps thinking of continuations?