Etymology of "struct"

F

Francine.Neary

People seem to have different views as to where the C reserved word
"struct" comes from. One explanation is that it is a shortening of
"structure", and another is that it is an acronym for "single type
representing useful compound types".

Does anyone here know the history of the word?
 
W

William Ahern

People seem to have different views as to where the C reserved word
"struct" comes from. One explanation is that it is a shortening of
"structure", and another is that it is an acronym for "single type
representing useful compound types".
Does anyone here know the history of the word?

It should be obvious, if only by application of the princple of Occam's
razor.

http://en.wikipedia.org/wiki/Occam's_Razor

http://en.wikipedia.org/wiki/Backronym

As somebody recently stated on comp.unix.programmer (IIRC) about the origins
of the "/usr" directory in Unix, the contemporary predilection for acronyms
is a relatively recent phenomenon. Or rather, more recent than the age from
whence C and Unix originated. Maybe somebody might dispute this, but I think
the evidence for similar name derivations makes a strong case.
 
A

Army1987

As somebody recently stated on comp.unix.programmer (IIRC) about the
origins
of the "/usr" directory in Unix, the contemporary predilection for
acronyms
is a relatively recent phenomenon. Or rather, more recent than the age
from
whence C and Unix originated. Maybe somebody might dispute this, but I
think
the evidence for similar name derivations makes a strong case.

What were proposed etymologies for it?
 
B

Bill Leary

People seem to have different views as to where the C reserved word
"struct" comes from. One explanation is that it is a shortening of
"structure", and another is that it is an acronym for "single type
representing useful compound types".

That "single type..." sounds like a backronym.

And when you consider other UNIX/c shortenings like "usr" and, especially,
"creat", I'd go for it just being a shortening.

Of course, there's always "yacc" and "awk" (among others) to give some
support to the idea.

- Bill
 
P

P.J. Plauger

Manuel T said:

That was my recollection. The first Unix system at Bell Labs put
the home directories for all users in /usr. When that later
spilled to a second disk, those of us sent there were put in
/crp. ("Creep" was a common synonym for "user".)

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
P

P.J. Plauger

That "single type..." sounds like a backronym.

And when you consider other UNIX/c shortenings like "usr" and, especially,
"creat", I'd go for it just being a shortening.

Of course, there's always "yacc" and "awk" (among others) to give some
support to the idea.

"struct" is short for "structure", just as "union" is short for
"union".

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
B

Bill Leary

P.J. Plauger said:
"struct" is short for "structure", just as "union" is short for
"union".

I agree. If I gave an impression otherwise, sorry about that.

- Bill
 
F

Francine.Neary

I agree. If I gave an impression otherwise, sorry about that.

Well, OK, I mean that seems the most likely to me too. But I was
really wondering if there's any records to support that, e.g. if an
early C manual said something like "a struct (or structure) is...", or
if people who were around in the early days remember how the name came
about.
 
K

Keith Thompson

Well, OK, I mean that seems the most likely to me too. But I was
really wondering if there's any records to support that, e.g. if an
early C manual said something like "a struct (or structure) is...", or
if people who were around in the early days remember how the name came
about.

<http://www.cs.bell-labs.com/who/dmr/primevalC.html>, written by
Dennis Ritchie:

"prestruct-c" is a copy of the compiler just before I started
changing it to use structures itself.

...

The earlier compiler does not know about structures at all: the
string "struct" does not appear anywhere. The second tape has a
compiler that does implement structures in a way that begins to
approach their current meaning. Their declaration syntax seems to
use () instead of {}, but . and -> for specifying members of a
structure itself and members of a pointed-to structure are both
there.

On the other hand, a Google search for the phrase "single type
representing useful compound types" gets exactly zero hits, and a
Google Groups search finds only this thread.

I remember one of the regulars here (I don't remember who it was)
coining a "backronym" for the "struct" keyword. His intent, I think,
was not to seriously suggest that the word "struct" is an acronym, but
to emphasize that a struct, not a typedef, is the way to create a new
type. I suspect the author would be surprised to see his invented
derivation being taken seriously.
 
D

Dave Vandervies

Keith Thompson said:
I remember one of the regulars here (I don't remember who it was)
coining a "backronym" for the "struct" keyword. His intent, I think,
was not to seriously suggest that the word "struct" is an acronym, but
to emphasize that a struct, not a typedef, is the way to create a new
type. I suspect the author would be surprised to see his invented
derivation being taken seriously.

Chris Torek, if I'm not mistaken. And it was "STRange spelling for
User-defined abstraCT type", which I suspect was in part designed to be
hard to take seriously.


dave
 
K

Keith Thompson

Chris Torek, if I'm not mistaken. And it was "STRange spelling for
User-defined abstraCT type", which I suspect was in part designed to be
hard to take seriously.

Yeah, that's what I was thinking of.
 
J

J. J. Farrell

Well, OK, I mean that seems the most likely to me too. But I was
really wondering if there's any records to support that, e.g. if an
early C manual said something like "a struct (or structure) is...", or
if people who were around in the early days remember how the name came
about.

We don't often hear from Dennis Ritchie here these days, but since P.
J. Plauger worked close to him through the original development of C,
wrote the first commercial C compiler, and was secretary of the
original ANSII C Standardization committee, you should be able to
treat his opinion as fairly definitive. That and common sense - struct
is obviously an abbreviation of structure. Strained contorted acronym
explanations for words which have obvious derivations are almost
always spurious (or, at the very least, deliberately invented to fit
the abbreviation).
 
J

Joachim Schmitz

P.J. Plauger said:
That was my recollection. The first Unix system at Bell Labs put
the home directories for all users in /usr. When that later
spilled to a second disk, those of us sent there were put in
/crp. ("Creep" was a common synonym for "user".)
I think /usr used to stand for USeR, but with more modern version of UNIX
tzhe users got moved elsewhere, usually /home, so /usr got "backronymed" to
Unix System Resource

Bye, Jojo
 
G

Gordon Burditt

That and common sense - struct
is obviously an abbreviation of structure. Strained contorted acronym
explanations for words which have obvious derivations are almost
always spurious (or, at the very least, deliberately invented to fit
the abbreviation).

Is there any truth to the rumor that the 'a' in acronym stands for
"asinine" :-?
 
F

Francine.Neary

<http://www.cs.bell-labs.com/who/dmr/primevalC.html>, written by
Dennis Ritchie:

"prestruct-c" is a copy of the compiler just before I started
changing it to use structures itself.

...

The earlier compiler does not know about structures at all: the
string "struct" does not appear anywhere. The second tape has a
compiler that does implement structures in a way that begins to
approach their current meaning. Their declaration syntax seems to
use () instead of {}, but . and -> for specifying members of a
structure itself and members of a pointed-to structure are both
there.

Thanks, that's a really interesting site. It's good that Dr. Ritchie
has written up some of the history for posterity - he must be really
quite old by now :)
On the other hand, a Google search for the phrase "single type
representing useful compound types" gets exactly zero hits, and a
Google Groups search finds only this thread.

So it does! I guess I must have misremembered one of the words... I
was actually at a presentation of programming jobs, and some guy swore
blind it was an acronym - real smooth talker :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top