Curious about O_CREATE vs O_CREAT

447 views
Skip to first unread message

mspieg...@gmail.com

unread,
Jan 19, 2015, 9:40:41 PM1/19/15
to golan...@googlegroups.com
I was feeling nostalgic and reading through the Unix Hater's Handbook, wondering what ever came of the old O_CREAT misspelling? I saw that it is spelled correctly in os.O_CREATE, which does not map to O_CREAT from the times of yore. I am curious to know if there is a story behind this?

andrey mirtchovski

unread,
Jan 19, 2015, 11:07:10 PM1/19/15
to mspieg...@gmail.com, golang-nuts
Ken made his own wish come true, is my guess.

---
"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."
Kernighan, Brian W.; Pike, Rob (1984). The UNIX programming
environment. Prentice-Hall. ISBN 0139376992. OCLC 10269821., p. 204.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ian Lance Taylor

unread,
Jan 19, 2015, 11:29:04 PM1/19/15
to andrey mirtchovski, mspieg...@gmail.com, golang-nuts
On Mon, Jan 19, 2015 at 8:06 PM, andrey mirtchovski
<mirtc...@gmail.com> wrote:
> Ken made his own wish come true, is my guess.
>
> ---
> "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."
> Kernighan, Brian W.; Pike, Rob (1984). The UNIX programming
> environment. Prentice-Hall. ISBN 0139376992. OCLC 10269821., p. 204.

https://github.com/golang/go/commit/c90d392ce3d3203e0c32b3f98d1e68c4c2b4c49b

I think that was the first commit after Go was publicly released.

Ian

Michael Jones

unread,
Jan 19, 2015, 11:58:44 PM1/19/15
to andrey mirtchovski, mspieg...@gmail.com, golang-nuts

The real story is that it was O_CREAT early on. I went to Ken and reminded him about that very quote and asked him to consider changing it. A few days later he checked in the CL for that change. ;-)

Reply all
Reply to author
Forward
0 new messages