

Spell it with an "e" - SwellJoe
http://code.google.com/p/go/source/detail?r=4a3f6bbb5f0c6021279ccb3c23558b3c480d995f

======
samlittlewood
I assume a reference to Ken Thompson:

[http://books.google.com/books?id=poFQAAAAMAAJ&q=spell+cr...](http://books.google.com/books?id=poFQAAAAMAAJ&q=spell+creat+with+an+e&dq=spell+creat+with+an+e)

~~~
wooster
Not only that, a commit -by- Ken Thompson.

------
cschep
This has nothing to do with the naming conflict.

~~~
wooster
'Ken Thompson was once asked what he would do differently if he were
redesigning the UNIX system. His reply: "I'd spell creat with an e."'

<http://en.wikiquote.org/wiki/Kenneth_Thompson#Attributed>

~~~
allenbrunson
i read somewhere that one of the early machines that unix ran on, maybe one of
the pdp series, had a five-character limit on function names, which was the
reason for 'creat'. or maybe a five-character limit on filenames? i'm not able
to google up any supporting evidence at the moment, so i'm open to refutations
or support.

~~~
jacquesm
Unlink is 6 characters, so is rename, geteuid and getppid are 7...

~~~
allenbrunson
unlink() could have come a lot later, or been at a different level of
abstraction, etc.

i'm really sure i read this, so i just made another attempt to find the
original source. the closest i could get was this man page for tmpnam:

"Many applications prefer their temporary files to have certain favorite
initial letter sequences in their names. Use the pfx argument for this. This
argument may be NULL or point to a string of up to five characters to be used
as the first few characters of the temporary-file name."

<http://www.phy.ohiou.edu/cgi-bin/man-cgi.sol?tmpnam+3S>

... which is a bit dubious, i admit, but just _might_ point to a five-
character file limit at one point in the murky past.

~~~
jacquesm
In some of the older version of the PDP assembler the symbols could be any
length, but only the first 6 characters were significant, so you'd better make
sure that your first 6 chars are unique.

I don't see any reason to mix filenames and symbol length in any language
though.

~~~
allenbrunson
the one time i was poking around in the source files for the C standard
library, the implementation for a given function was always in a similarly-
named source file. printf() was in printf.c, and so on.

so let's say you're implementing unix on a machine that has a five-character
filename limit, and you want to follow that rule. creat.c is going to
implement creat().

that would explain why he now thinks it's a mistake: he _could_ have
implemented create() in creat.c, but chose convention over forward-thinking.

~~~
cpr
I'm pretty sure Unix even in its most primitive forms never had a 5-character
filename limit. It might have been 8 initially, but not less than that.

~~~
allenbrunson
yeah, i admit, i'm kind of reaching. i am sure i read a story about where the
original limitation came from, i just can't remember the details.

maybe it had something to do with kernel functions versus library functions?
creat(), read(), write(), etc were all part of the early unix kernel, and were
accessed via call gate or syscall or something, whereas printf() and friends
were part of a library, and didn't require a trip into kernel-land, and
therefore weren't under the same restrictions. something like that.

