Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: Found a use case for `const` by value return, a shared queue Date: Wed, 08 Feb 2023 17:15:51 -0800 Organization: None to speak of Lines: 24 Message-ID: <871qmzej08.fsf@nosuchdomain.example.com> References: <87lel8kspr.fsf@bsb.me.uk> <87r0uzk6wd.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="8191dc9d3cc9a723636202e99e75b43d"; logging-data="443453"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4bdKT8r7Tk8KczqdC1i80" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:3B6rEQaR0mY0jFnbLbguyFa2Ym4= sha1:6eD9C2LKlfa9Y2xJYK6Cj8rbyZI= Xref: csiph.com comp.lang.c++:89048 Ben Bacarisse writes: > red floyd writes: >> On 2/8/2023 8:49 AM, Ben Bacarisse wrote: >>> The names are a bit confusing because not_eq and and_eq share an ending >>> but one is about equality and the other about assignment. >> >> I think they chose those expansions because they match how people would >> say those operators when reading code out loud. > > Yes, I imagine that's the motivation (with "equals" abbreviated). But I > don't read = as "equals". I read it as "is" or "becomes" depending on > whether it's in an initialisation or an assignment, so and_eq sounds all > wrong to me. It's "bitwise and becomes" when I have to read it out. > > And it's odd that &&= and ||= don't get alternatives. OK, much less > frequently used, so I suppose that's why. I suggest that they're rarely used because they don't exist. (Perl does have them, but C++ does not.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for XCOM Labs void Void(void) { Void(); } /* The recursive call of the void */