Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #149927

Re: Puzzling "implicit declaration" Warning

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: Puzzling "implicit declaration" Warning
Date 2020-02-10 11:14 -0800
Organization None to speak of
Message-ID <87wo8uz24l.fsf@nosuchdomain.example.com> (permalink)
References <WsmdnVL9ioPMhaDDnZ2dnUU7_83NnZ2d@giganews.com> <slrnr3q9cl.km3.grahn+nntp@frailea.sa.invalid> <C_ednVHwpKXf4aPDnZ2dnUU7_83NnZ2d@giganews.com> <87a75s1zdp.fsf@nosuchdomain.example.com> <_YudnRFL7p_klNzDnZ2dnUU7_83NnZ2d@giganews.com>

Show all headers | View raw


Robbie Hatley <see.my.signature@for.my.contact.info> writes:
> On 2020-02-08 2:35 PM, Keith Thompson wrote:
>> ... Using obscure names like Beren and Luthien
>> rather than argc and argv  doesn't help anyone.
>> Please write clear code....
>
> If you find the names "Beren" and "Luthien" to be "obscure",
> you need to read The Silmarillion. :-)
>
> As for that "not helping", "not helping" who with what?

Communication.

> My goal there was not to help C programmers understand
> code better. But then, that was CLEARLY never my goal,
> so why are we even talking about it as if it was?

You posted to a forum full of C programmers.  You posted C code.
Did you not want those C programmers to understand your code?

By using silly names, you made that more difficult.  If you do that
deliberately, many of us will be less inclined to help you.

> As for the ACTUAL goal, I'd have to say it's love and
> remembrance, things which even the least-emotional
> C programmers should understand, even though it has nothing
> to do with C, programming, computers, or technology.

You like Tolkein.  Good for you.  You can put any irrelevancies
you like in your signature (at the end of the article, following
a line consisting of "-- ").

Or you can write anything you like if your goal is to annoy people.

> As for "argc" and "argv", I find those stultifying, and
> indeed they are unnecessary, as C compilers just look for
> "left argument of main" and "right argument of main", and
> don't care about the NAMES at all. So I always use Beren
> and Luthien instead, because I program computers, computers
> don't program me.

Do you object to the words "left" and "right" in English?  Do you
find them "stultifying?

You're absolutely right that the compiler doesn't care what you
call the parameters of main.  Human readers do.

> Now, the variables "Bob" and "Carol" in my little program,
> I admit were unnecessarily nondescriptive, so I changed
> them to "number" and "digits".

You understand why "Bob" and "Carol" were poor choices.  "Beren"
and "Luthien" are just as bad, perhaps worse, for exactly the same
reason.  ("Bob" and "Carol" are not uncommonly used as generic
names like "foo" and "bar".  "Beren" and "Luthien" are not, and
are more distracting.)

[...]

>> ...Typically gcc works with the "native" library for the platform.
>> There's no particular reason that has to be glibc...
>
> Ok. That does raise all sorts of possibilities both for errors
> and maybe for abuse, though. I could implement "hatleylib" in
> such a way that whenever someone calls the "asinh()" function
> in a program, it does a destructive reformat of drive C: or
> some other unpleasant thing.

Of course, you could implement a C library that doesn't work
correctly.  The easiest way to do that would be to take an existing
open source library and break it in some way.  You could implement
a non-working compiler in the same way.

A C implementation includes a number of components, including a
compiler and a run-time library.  Some are tightly integrated,
but gcc is specifically designed to work with a variety of
runtime libraries.  (In fact gcc appears to be about a year older
than glibc.)  Ensuring that the components work together is the
responsibility of whoever puts them together into an implementation.

[...]

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Puzzling "implicit declaration" Warning Robbie Hatley <see.my.signature@for.my.contact.info> - 2020-02-06 23:57 -0800
  Re: Puzzling "implicit declaration" Warning Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-02-07 08:53 +0000
    Re: Puzzling "implicit declaration" Warning Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-07 02:12 -0800
      Re: Puzzling "implicit declaration" Warning Robbie Hatley <see.my.signature@for.my.contact.info> - 2020-02-08 01:53 -0800
        Re: Puzzling "implicit declaration" Warning Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-08 12:59 +0000
          Re: Puzzling "implicit declaration" Warning Manfred <noname@invalid.add> - 2020-02-08 17:21 +0100
            Re: Puzzling "implicit declaration" Warning Manfred <noname@invalid.add> - 2020-02-08 17:34 +0100
            Re: Puzzling "implicit declaration" Warning Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-08 14:37 -0800
        Re: Puzzling "implicit declaration" Warning scott@slp53.sl.home (Scott Lurndal) - 2020-02-08 18:39 +0000
    Re: Puzzling "implicit declaration" Warning Robbie Hatley <see.my.signature@for.my.contact.info> - 2020-02-08 01:15 -0800
      Re: Puzzling "implicit declaration" Warning chad <cdalten@gmail.com> - 2020-02-08 05:05 -0800
      Re: Puzzling "implicit declaration" Warning Bart <bc@freeuk.com> - 2020-02-08 14:05 +0000
      Re: Puzzling "implicit declaration" Warning Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-08 14:35 -0800
        Re: Puzzling "implicit declaration" Warning Bart <bc@freeuk.com> - 2020-02-08 22:39 +0000
          Re: Puzzling "implicit declaration" Warning Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-08 15:30 -0800
          Re: Puzzling "implicit declaration" Warning David Brown <david.brown@hesbynett.no> - 2020-02-09 12:24 +0100
        Re: Puzzling "implicit declaration" Warning Robbie Hatley <see.my.signature@for.my.contact.info> - 2020-02-09 23:42 -0800
          Re: Puzzling "implicit declaration" Warning chad <cdalten@gmail.com> - 2020-02-10 05:34 -0800
          Re: Puzzling "implicit declaration" Warning Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-10 16:12 +0000
          Re: Puzzling "implicit declaration" Warning Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-10 11:14 -0800
            Re: Puzzling "implicit declaration" Warning Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-02-11 07:06 +0000
            Re: puzzling enragement by innocuous variable names Robbie Hatley <see.my.signature@for.my.contact.info> - 2020-09-10 19:47 -0700
              Re: puzzling enragement by innocuous variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-09-10 20:28 -0700
              Re: puzzling enragement by innocuous variable names Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> - 2020-09-13 14:57 +1000
                Re: puzzling enragement by innocuous variable names gazelle@shell.xmission.com (Kenny McCormack) - 2020-09-15 17:58 +0000
              Re: puzzling enragement by innocuous variable names Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-09-14 09:38 -0600
          Re: Puzzling "implicit declaration" Warning James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-11 00:21 -0500
  Re: Puzzling "implicit declaration" Warning Les Cargill <lcargill99@comcast.com> - 2020-02-08 17:00 -0600
    Re: Puzzling "implicit declaration" Warning Robbie Hatley <see.my.signature@for.my.contact.info> - 2020-02-09 22:50 -0800
      Re: Puzzling "implicit declaration" Warning Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-10 16:00 +0000
        Re: Puzzling "implicit declaration" Warning scott@slp53.sl.home (Scott Lurndal) - 2020-02-10 16:28 +0000
          Re: Puzzling "implicit declaration" Warning Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-10 16:42 +0000

csiph-web