| Deutsch English Français Italiano |
|
<86a5io88lc.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
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 <tr.17687@z991.linuxsc.com> 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: <v66eci$2qeee$1@dont-email.me> <87h6d2uox5.fsf@nosuchdomain.example.com> <v6d779$6rk5$2@dont-email.me> <v6e76u$c0i9$1@dont-email.me> <v6esqm$fian$2@dont-email.me> <v6f7vg$hgam$1@dont-email.me> <20240707164747.258@kylheku.com> <v6gl83$s72a$1@dont-email.me> <v6h8ao$ur1v$1@dont-email.me> <v6jhk3$1drd6$1@dont-email.me> <v6jiud$1dsjb$1@dont-email.me> <877cdur1z9.fsf@bsb.me.uk> <v6joi4$1epoj$1@dont-email.me> <871q42qy33.fsf@bsb.me.uk> <v6k6i0$1h4d3$1@dont-email.me> <87ed82p28y.fsf@bsb.me.uk> <v6m03l$1tf05$1@dont-email.me> <87r0c1nzjj.fsf@bsb.me.uk> <v6m716$1urj4$1@dont-email.me> <87ikxconq4.fsf@bsb.me.uk> <v6n8iu$24af0$1@dont-email.me> 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 <bc@freeuk.com> writes: > On 11/07/2024 00:01, Ben Bacarisse wrote: > >> bart <bc@freeuk.com> 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.