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


Groups > comp.lang.c > #143046

Re: Scopes of identifiers

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Scopes of identifiers
Date 2019-04-12 01:11 +0100
Organization A noiseless patient Spider
Message-ID <87tvf49j60.fsf@bsb.me.uk> (permalink)
References (1 earlier) <e9d0004b-6a21-43ef-98f6-16ed2152d985@googlegroups.com> <lnk1g12nx8.fsf@kst-u.example.com> <q8o2mg$21k$1@dont-email.me> <dkMrE.99323$DD7.57717@fx05.iad> <c02250b3-87cc-4b99-9bd6-1bb64658971d@googlegroups.com>

Show all headers | View raw


Thiago Adams <thiago.adams@gmail.com> writes:
<cut>
> I wish I could understand how C started because the [feeling] is
> that the design is almost by accident.

Not really by accident, but early C has a sense of being "just enough"
to get by.  For example (directly related to your topic), in early C,
struct members were not associated with structs -- they were simply a
type and offset.  You could write

  struct { float f; };

  struct { int i; } s;
  s.i = 42;
  printf("%f\n", s.f);

or even

  int x = 42;
  printf("%f\n", x.f);

to see what float corresponds to the bit pattern for 42.  There were no
unions either because you could just do this sort of thing instead.

The information held in the symbol table about f was simply that it was
a float at offset zero from some object.  That object could be of any
type.

I know (as an academic) I shouldn't, but I liked that feature!  I seemed
to "fit" with how I thought of C at the time.

> When I try to find something about the C history I find just:
>
> https://www.bell-labs.com/usr/dmr/www/chist.html
>
> I think old printed magazines also can be interesting but it hard 
> to find. 
>
> Does anyone knows where to find more information about C history?

If you go up a level from that link there are some other documents that
will interest you.  In particular the old C reference manuals.

-- 
Ben.

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


Thread

Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-10 16:15 -0700
  Re: Scopes of identifiers Bart <bc@freeuk.com> - 2019-04-11 00:33 +0100
    Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-10 16:45 -0700
    Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-10 18:31 -0700
  Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-10 16:34 -0700
    Re: Scopes of identifiers Robert Wessel <robertwessel2@yahoo.com> - 2019-04-10 20:50 -0500
    Re: Scopes of identifiers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-04-10 20:02 -0700
    Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-10 20:58 -0700
      Re: Scopes of identifiers luser droog <luser.droog@gmail.com> - 2019-04-10 21:48 -0700
      Re: Scopes of identifiers Andrey Tarasevich <andreytarasevich@hotmail.com> - 2019-04-11 11:57 -0700
        Re: Scopes of identifiers scott@slp53.sl.home (Scott Lurndal) - 2019-04-11 19:12 +0000
          Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-11 12:35 -0700
            Re: Scopes of identifiers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-04-12 01:11 +0100
              Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-12 05:29 -0700
                Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-12 05:39 -0700
        Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-11 14:00 -0700
          Re: Scopes of identifiers Nick Bowler <nbowler@draconx.ca> - 2019-04-15 19:48 +0000
    Re: Scopes of identifiers Bart <bc@freeuk.com> - 2019-04-11 10:36 +0100
      Re: Scopes of identifiers Bart <bc@freeuk.com> - 2019-04-11 14:25 +0100
        Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-11 10:20 -0700
    Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-11 05:00 -0700
    Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-11 06:42 -0700
      Re: Scopes of identifiers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-04-11 08:11 -0700
  Re: Scopes of identifiers BGB <cr88192@gmail.com> - 2019-04-10 22:35 -0500
    Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-10 22:04 -0700
      Re: Scopes of identifiers BGB <cr88192@gmail.com> - 2019-04-11 05:46 -0500
  Re: Scopes of identifiers John Bode <jfbode1029@gmail.com> - 2019-04-11 12:04 -0700
    Re: Scopes of identifiers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-04-11 13:18 -0700
    Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-11 14:31 -0700
  Re: Scopes of identifiers Andrey Tarasevich <andreytarasevich@hotmail.com> - 2019-04-11 12:28 -0700
    Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-11 12:50 -0700
    Re: Scopes of identifiers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-04-11 14:20 -0700
      Re: Scopes of identifiers Thiago Adams <thiago.adams@gmail.com> - 2019-04-11 14:43 -0700
      Re: Scopes of identifiers Andrey Tarasevich <andreytarasevich@hotmail.com> - 2019-04-11 15:04 -0700
        Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-11 17:08 -0700
          Re: Scopes of identifiers Andrey Tarasevich <andreytarasevich@hotmail.com> - 2019-04-11 18:45 -0700
            Re: Scopes of identifiers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-04-11 23:16 -0400
            Re: Scopes of identifiers Keith Thompson <kst-u@mib.org> - 2019-04-11 20:19 -0700
            Re: Scopes of identifiers Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-04-12 14:39 -0700
            Re: Scopes of identifiers Ike Naar <ike@sdf.lonestar.org> - 2019-04-13 20:02 +0000
      Re: Scopes of identifiers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-04-11 23:26 -0400

csiph-web