From: lm@mcvoy.com (Larry McVoy)
Subject: [TUHS] early cc variable and function names
Date: Thu, 16 Oct 2014 19:52:42 -0700 [thread overview]
Message-ID: <20141017025242.GH6963@mcvoy.com> (raw)
In-Reply-To: <20141017024049.GI17227@mercury.ccil.org>
On Thu, Oct 16, 2014 at 10:40:49PM -0400, John Cowan wrote:
> Noel Chiappa scripsit:
>
> > The a.out symbol tables use 8-character fields to hold symbol names. However,
> > C automagically and unavoidably prepends an _ to all externals (I forget
> > about automatics, registers, etc - too tired to check right now), making the
> > limit for C names 7 characters.
>
> The _ was only for externals, including all procedure names. It prevented
> collisions with names introduced into the assembly-language source or
> in libc.
This is perhaps a side note but I believe all structure fields shared a
namespace. So stat.size and whatever.size were not allowed, they collided.
So we got sb.st_size which I personally love and wish it were still like
that.
xyz.size
abc.size
foobar.size
What are the types of those structures?
abc.st_size
Huh, abc is a struct stat.
I get that it was a bug and needed to be fixed but I wish that everyone
still pretended that it was one namespace, makes code so much easier to
read.
--
---
Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm
next prev parent reply other threads:[~2014-10-17 2:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 2:29 Noel Chiappa
2014-10-17 2:40 ` John Cowan
2014-10-17 2:52 ` Larry McVoy [this message]
2014-10-17 3:46 ` John Cowan
2014-10-17 3:54 ` Larry McVoy
2014-10-17 19:41 ` Clem Cole
2014-10-17 20:37 ` random832
2014-10-17 20:42 ` Larry McVoy
-- strict thread matches above, loose matches on Subject: below --
2014-10-18 10:32 Noel Chiappa
2014-10-18 23:03 ` Ron Natalie
2014-10-18 23:11 ` Dave Horsfall
2014-10-17 16:11 Noel Chiappa
2014-10-17 1:51 Mark Longridge
2014-10-17 2:20 ` Milo Velimirovic
2014-10-17 2:21 ` Dave Horsfall
2014-10-17 13:35 ` random832
2014-10-17 13:44 ` Warner Losh
2014-10-17 14:07 ` arnold
2014-10-17 14:22 ` Milo Velimirović
2014-10-17 19:29 ` random832
2014-10-18 7:25 ` Greg 'groggy' Lehey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141017025242.GH6963@mcvoy.com \
--to=lm@mcvoy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).