Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

To program is to be.


devel / comp.lang.c / Re: Why does the -> operator exist ?

SubjectAuthor
* Why does the -> operator exist ?Spiros Bousbouras
+* Re: Why does the -> operator exist ?Felix Palmen
|`* Re: Why does the -> operator exist ?Spiros Bousbouras
| `- Re: Why does the -> operator exist ?Ben Bacarisse
+* Re: Why does the -> operator exist ?Bart
|+* Re: Why does the -> operator exist ?Ben Bacarisse
||`- Re: Why does the -> operator exist ?BGB
|`* Re: Why does the -> operator exist ?fir
| `* Re: Why does the -> operator exist ?fir
|  `- Re: Why does the -> operator exist ?fir
+- Re: Why does the -> operator exist ?Lew Pitcher
+* Re: Why does the -> operator exist ?Kaz Kylheku
|`* Re: Why does the -> operator exist ?Bart
| `- Re: Why does the -> operator exist ?Kaz Kylheku
+- Re: Why does the -> operator exist ?BGB
+* Re: Why does the -> operator exist ?Keith Thompson
|+- Re: Why does the -> operator exist ?Joe Pfeiffer
|+* Re: Why does the -> operator exist ?Spiros Bousbouras
||`- Re: Why does the -> operator exist ?Kaz Kylheku
|`* Re: Why does the -> operator exist ?Tim Rentsch
| +* Re: Why does the -> operator exist ?Keith Thompson
| |`* Re: Why does the -> operator exist ?Tim Rentsch
| | `* Re: Why does the -> operator exist ?Keith Thompson
| |  `* Re: Why does the -> operator exist ?Tim Rentsch
| |   +- I love it... (Was: Why does the -> operator exist ?)Kenny McCormack
| |   `* Re: Why does the -> operator exist ?Keith Thompson
| |    +- Re: Why does the -> operator exist ?Phil Carmody
| |    `- Re: Why does the -> operator exist ?Tim Rentsch
| `- Re: Why does the -> operator exist ?Kaz Kylheku
`- Re: Why does the -> operator exist ?Andrey Tarasevich

Pages:12
Re: Why does the -> operator exist ?

<86wmxx7t7l.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27608&group=comp.lang.c#27608

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: Why does the -> operator exist ?
Date: Mon, 14 Aug 2023 04:34:54 -0700
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <86wmxx7t7l.fsf@linuxsc.com>
References: <trfLpf+N71iCzEwJm@bongo-ra.co> <87fs6cso8n.fsf@nosuchdomain.example.com> <86fs5ivxfu.fsf@linuxsc.com> <874jlyq8re.fsf@nosuchdomain.example.com> <86pm3xbswl.fsf@linuxsc.com> <877cq5qfc6.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="43370f569e8ab1d7fa987214319e42b9";
logging-data="2430986"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/43KTnOBi5zkhmZzVNMFva04mBMfP10y8="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:FPjr6FPIgRhbiJdFif0uWtxYl1M=
sha1:IT8WGJxruhV55j2OiF9Vxi+x9wM=
 by: Tim Rentsch - Mon, 14 Aug 2023 11:34 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>
>>>>> [...] I would argue that using `->` rather than `.` when the
>>>>> prefix is a pointer makes for more explicit code, which is a
>>>>> good thing; [...]
>>>>
>>>> More explicit is not always better.
>>>
>>> No, it isn't.
>>>
>>> If you had anything to say about this particular case (`->` being
>>> more explicit than `.`, and whether it's better), this would have
>>> been a good opportunity to say it.
>>
>> In the particular case of using '.' instead of '->', more
>> explicit is not always better.
>
> That's a useless statement.

No more useless than the statement from you that prompted
the discussion.

I love it... (Was: Why does the -> operator exist ?)

<ubd7dc$3i682$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27613&group=comp.lang.c#27613

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: I love it... (Was: Why does the -> operator exist ?)
Date: Mon, 14 Aug 2023 12:41:16 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubd7dc$3i682$1@news.xmission.com>
References: <trfLpf+N71iCzEwJm@bongo-ra.co> <86pm3xbswl.fsf@linuxsc.com> <877cq5qfc6.fsf@nosuchdomain.example.com> <86wmxx7t7l.fsf@linuxsc.com>
Injection-Date: Mon, 14 Aug 2023 12:41:16 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3741954"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 14 Aug 2023 12:41 UTC

In article <86wmxx7t7l.fsf@linuxsc.com>,
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
....
>> That's a useless statement.
>
>No more useless than the statement from you that prompted
>the discussion.

I love it when CLC regs fight!

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Infallibility

Re: Why does the -> operator exist ?

<87bkf9mg0y.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27632&group=comp.lang.c#27632

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Why does the -> operator exist ?
Date: Mon, 14 Aug 2023 15:10:37 -0700
Organization: None to speak of
Lines: 64
Message-ID: <87bkf9mg0y.fsf@nosuchdomain.example.com>
References: <trfLpf+N71iCzEwJm@bongo-ra.co>
<87fs6cso8n.fsf@nosuchdomain.example.com> <86fs5ivxfu.fsf@linuxsc.com>
<874jlyq8re.fsf@nosuchdomain.example.com> <86pm3xbswl.fsf@linuxsc.com>
<877cq5qfc6.fsf@nosuchdomain.example.com> <86wmxx7t7l.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="09fbea63c7f3f6d2cf54fb60a378c312";
logging-data="2623368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rt9ammUpamKxrxi/OtgjD"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:o2rA9raqjUBeANI3WDrvPicCoVQ=
sha1:D4Nsm7+H2WmPt44Q6Ew62b1z0Ew=
 by: Keith Thompson - Mon, 14 Aug 2023 22:10 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>> [...] I would argue that using `->` rather than `.` when the
>>>>>> prefix is a pointer makes for more explicit code, which is a
>>>>>> good thing; [...]
>>>>>
>>>>> More explicit is not always better.
>>>>
>>>> No, it isn't.
>>>>
>>>> If you had anything to say about this particular case (`->` being
>>>> more explicit than `.`, and whether it's better), this would have
>>>> been a good opportunity to say it.
>>>
>>> In the particular case of using '.' instead of '->', more
>>> explicit is not always better.
>>
>> That's a useless statement.
>
> No more useless than the statement from you that prompted
> the discussion.

My original statement, quoted above, was that using `->` rather than
`.` is more explicit and that that's a good thing. That was and
is my opinion, applicable only to that particular case. I've used
languages that use `.` for both (where the prefix can be either
a structure or a pointer), and haven't had any particular problem
with that. I have a preference, but not a strong preference.

If I see `foo->bar` in C code, I know that `foo` is a pointer
expression pointing to a struct or union. If I see `foo.bar`, I
know that `foo` is an expression of struct or union type. I know
that without looking for the declaration. I sometimes find it
useful to be able to understand something about a code fragment
without having to understand 100% of the context.

You apparently think that was a useless statement. You apparently
thought it was important enough to comment on it.

You refuted a claim that explicit is *always* better. Of course
I never said that, nor do I believe it.

I tried to invite you to expand on your statement. Perhaps you think
that dropping `->` and using `.` for both structs and pointers (and
unions and union pointers) would have been better. Perhaps you have
good reasons for your preference, assuming it is your preference.
Perhaps an explanation of those preferences would have been useful
and interesting. Heck, I might even agree with you.

Instead, you chose to respond several times, adding exactly nothing
useful to the discussion. Perhaps you expected us to understand
what you were thinking without you saying it. If so, that was an
unrealistic expectation.

Let's stop this.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: Why does the -> operator exist ?

<877cpw3wjx.fsf@fatphil.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27719&group=comp.lang.c#27719

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pc+use...@asdf.org (Phil Carmody)
Newsgroups: comp.lang.c
Subject: Re: Why does the -> operator exist ?
Date: Tue, 15 Aug 2023 23:00:50 +0300
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <877cpw3wjx.fsf@fatphil.org>
References: <trfLpf+N71iCzEwJm@bongo-ra.co>
<87fs6cso8n.fsf@nosuchdomain.example.com> <86fs5ivxfu.fsf@linuxsc.com>
<874jlyq8re.fsf@nosuchdomain.example.com> <86pm3xbswl.fsf@linuxsc.com>
<877cq5qfc6.fsf@nosuchdomain.example.com> <86wmxx7t7l.fsf@linuxsc.com>
<87bkf9mg0y.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="9176dbab4427e178b28c3a609a56f3cb";
logging-data="3113645"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19baNPI1lrPH1GQqcOhX2ZL"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Cancel-Lock: sha1:bVZWBbQy+zTiqDZhydDcWgt/pTY=
sha1:fyH4/GwCah1eMUoh/Y0ECWgb4/Y=
 by: Phil Carmody - Tue, 15 Aug 2023 20:00 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>>> [...] I would argue that using `->` rather than `.` when the
>>>>>>> prefix is a pointer makes for more explicit code, which is a
>>>>>>> good thing; [...]
>>>>>>
>>>>>> More explicit is not always better.
>>>>>
>>>>> No, it isn't.
>>>>>
>>>>> If you had anything to say about this particular case (`->` being
>>>>> more explicit than `.`, and whether it's better), this would have
>>>>> been a good opportunity to say it.
>>>>
>>>> In the particular case of using '.' instead of '->', more
>>>> explicit is not always better.
>>>
>>> That's a useless statement.
>>
>> No more useless than the statement from you that prompted
>> the discussion.
>
> My original statement, quoted above, was that using `->` rather than
> `.` is more explicit and that that's a good thing. That was and
> is my opinion, applicable only to that particular case. I've used
> languages that use `.` for both (where the prefix can be either
> a structure or a pointer), and haven't had any particular problem
> with that. I have a preference, but not a strong preference.
>
> If I see `foo->bar` in C code, I know that `foo` is a pointer
> expression pointing to a struct or union. If I see `foo.bar`, I
> know that `foo` is an expression of struct or union type. I know
> that without looking for the declaration. I sometimes find it
> useful to be able to understand something about a code fragment
> without having to understand 100% of the context.
>
> You apparently think that was a useless statement. You apparently
> thought it was important enough to comment on it.
>
> You refuted a claim that explicit is *always* better. Of course
> I never said that, nor do I believe it.
>
> I tried to invite you to expand on your statement. Perhaps you think
> that dropping `->` and using `.` for both structs and pointers (and
> unions and union pointers) would have been better. Perhaps you have
> good reasons for your preference, assuming it is your preference.
> Perhaps an explanation of those preferences would have been useful
> and interesting. Heck, I might even agree with you.

If I see:
foo->x *= 2;
frob(foo);
I don't even twitch. However, if I see:
foo.x *= 2;
frob(foo);
I begin to worry - how much of a structure am I filling the stack with,
or is frob just a harmless macro, or what. I immediately need to know
more.

So I'm definitely in team keep-em-different.

Phil
--
We are no longer hunters and nomads. No longer awed and frightened, as we have
gained some understanding of the world in which we live. As such, we can cast
aside childish remnants from the dawn of our civilization.
-- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/

Re: Why does the -> operator exist ?

<86zg2r5fxn.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27765&group=comp.lang.c#27765

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: Why does the -> operator exist ?
Date: Wed, 16 Aug 2023 05:29:08 -0700
Organization: A noiseless patient Spider
Lines: 93
Message-ID: <86zg2r5fxn.fsf@linuxsc.com>
References: <trfLpf+N71iCzEwJm@bongo-ra.co> <87fs6cso8n.fsf@nosuchdomain.example.com> <86fs5ivxfu.fsf@linuxsc.com> <874jlyq8re.fsf@nosuchdomain.example.com> <86pm3xbswl.fsf@linuxsc.com> <877cq5qfc6.fsf@nosuchdomain.example.com> <86wmxx7t7l.fsf@linuxsc.com> <87bkf9mg0y.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="e1408e2ca4eb08ed594cd7d645ae4b51";
logging-data="3473281"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yF/LkKY+jfOW8BnTvnm+YxYABr8lVw9U="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:+85DBGhNcfLluxOMTPRxnRuEUp4=
sha1:2Yz2rZPQgOcXCqxxa1BdRz/FyFY=
 by: Tim Rentsch - Wed, 16 Aug 2023 12:29 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>
>>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>>
>>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>>
>>>>>>> [...] I would argue that using `->` rather than `.` when the
>>>>>>> prefix is a pointer makes for more explicit code, which is a
>>>>>>> good thing; [...]
>>>>>>
>>>>>> More explicit is not always better.
>>>>>
>>>>> No, it isn't.
>>>>>
>>>>> If you had anything to say about this particular case (`->` being
>>>>> more explicit than `.`, and whether it's better), this would have
>>>>> been a good opportunity to say it.
>>>>
>>>> In the particular case of using '.' instead of '->', more
>>>> explicit is not always better.
>>>
>>> That's a useless statement.
>>
>> No more useless than the statement from you that prompted
>> the discussion.
>
> My original statement, quoted above, was that using `->` rather
> than `.` is more explicit and that that's a good thing. That was
> and is my opinion, applicable only to that particular case. I've
> used languages that use `.` for both (where the prefix can be
> either a structure or a pointer), and haven't had any particular
> problem with that. I have a preference, but not a strong
> preference.
>
> If I see `foo->bar` in C code, I know that `foo` is a pointer
> expression pointing to a struct or union. If I see `foo.bar`, I
> know that `foo` is an expression of struct or union type. I know
> that without looking for the declaration. I sometimes find it
> useful to be able to understand something about a code fragment
> without having to understand 100% of the context.
>
> You apparently think that was a useless statement. You apparently
> thought it was important enough to comment on it.

I didn't say your statement was useless. I said only that
my statement is no more useless than yours.

> You refuted a claim that explicit is *always* better. Of course I
> never said that, nor do I believe it.

I was not refuting, nor was I trying to refute, any such claim.
I was merely responding to a statement of your opinion, giving
a statement of my own opinion.

> I tried to invite you to expand on your statement. Perhaps you
> think that dropping `->` and using `.` for both structs and
> pointers (and unions and union pointers) would have been better.
> Perhaps you have good reasons for your preference, assuming it is
> your preference. Perhaps an explanation of those preferences
> would have been useful and interesting. Heck, I might even agree
> with you.

You asked if I had anything to say about this particular case.
I did that.

> Instead, you chose to respond several times,

This statement mischaracterizes my postings. I responded once to
your implicit question about a more specific statement. I
responded later to your one-line posting saying that my response
was a useless statement. In both cases I was responding to what
was said in the immediately previous posting.

> adding exactly
> nothing useful to the discussion. Perhaps you expected us to
> understand what you were thinking without you saying it. If so,
> that was an unrealistic expectation.

It would be good for you to learn that just because you want
something doesn't mean that other people want it.

> Let's stop this.

Feel free to stop at any time. If there are no responses to my
comments here I'm not inclined to continue.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor