Path: ...!feeds.phibee-telecom.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: technology discussion =?utf-8?Q?=E2=86=92?= does the world need
a "new" C ?
Date: Thu, 11 Jul 2024 04:35:27 -0700
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <86a5io88lc.fsf@linuxsc.com>
References: <87h6d2uox5.fsf@nosuchdomain.example.com> <20240707164747.258@kylheku.com> <877cdur1z9.fsf@bsb.me.uk> <871q42qy33.fsf@bsb.me.uk> <87ed82p28y.fsf@bsb.me.uk> <87r0c1nzjj.fsf@bsb.me.uk> <87ikxconq4.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 11 Jul 2024 13:35:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="63b2cd43183ed9f1034fa7ab191192fd";
logging-data="2560763"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kplhSXYRwVwVI4duCOimbnsa396qhm80="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:aklFXQxSJC76eKI76GLicCYMcIY=
sha1:/IfzdgiScBxegDs9O4EQKQp4cGg=
Bytes: 3343
bart writes:
> On 11/07/2024 00:01, Ben Bacarisse wrote:
>
>> bart writes:
>>
>>> On 10/07/2024 14:32, Ben Bacarisse wrote:
>>>
>>> I still consider arrays in C to be 'passed' by a
>>> mechanism which is near-indistinguishable from actual
>>> pass-by-reference.
>>
>> I don't really care how you consider it, but I do care about how you
>> misrepresent the facts in public.
>>
>> In another post you said that your language has pass by reference, and
>> we also know you have implemented C. Either you are just very confused
>> and your language simply has call by value (after all, you think C has
>> pass by reference), or you know that pass by reference in your language
>> needs something from the implementation that was not needed when you
>> implemented C. I can't decide if you are confused or just lying.
>
> The way it works in my language is very simple (this is what I do
> after all):
>
> type T = int
>
> proc F(T x)= # Pass by value
> println x.typestr
> end
>
> proc G(ref T x)= # Manual pass-by-reference
> println x^.typestr
> end
>
> proc H(T &x)= # Auto pass-by-reference
> println x.typestr
> end
>
> proc main=
> T a
>
> F(a)
> G(&a)
> H(a)
> end
>
> I've written 3 functions using pass-by-value, pass-by-value emulating
> pass-by-reference, and actual pass-by-reference. [...]
No one doubts that call by reference can be implemented.
The point is that call by reference is not what C does.
And no amount of analogy or imagination or wishful
thinking is going to change that.