4 ms·
and ken in the go source tree in 2009: > spell it with an "e" https://go.googlesource.com/go/+/c90d392ce3d3203e0c32b3f98d1e68c4c2b4c49b%5E%21/#F0 https://go.g
by nishanths 4y ago
and ken in the go source tree in 2009:
> spell it with an "e"
https://go.googlesource.com/go/+/c90d392ce3d3203e0c32b3f98d1e68c4c2b4c49b%5E%21/#F0 https://go.googlesource.com/go/+/c90d392ce3d3203e0c32b3f98d1...
- colejohnson66 4y agoTangent: I've yet to find what I'd deem a "definitive" answer on why the 'e' was dropped. Sure, Ken said it was his biggest mistake, but every answer on why it's missing just point to the quote from him. I've seen suggestions related to a possible six-character limit (from Radix50 - "50" being octal for 64), but "creat" is only five. And being a mistake, why was it never fixed early on?
- userbinator 4y agoAnd being a mistake, why was it never fixed early on? Maybe because it became part of the jargon and served a useful purpose --- if you mention creat, it's certain you're talking about the system call and not creation in general. Personally, I like names which are close enough to an existing concept to be evocative of the meaning, but also distinct enough that, just like "byte" vs "bite" and "nybble" vs "nibble", a (non-stupid) search engine can give relevant results.
- topaz0 4y ago> 50 being octal for 64 Looks like 40 to me... 64 would be 100.
- yencabulator 4y agoI was going based on the theory of "5 characters plus leading underscore hits linker 6-character limit", but then this document talks about a system call named "execute". If "execute" was really called "exec" in the source, then none of the syscall names I saw are longer than "creat".
- colejohnson66 4y agoExcept in this document, it's actually documented as "create" (with an 'e')
- yencabulator 4y agoMaybe this document predates (discovery of) the linker limitation? My understanding is that the linker didn't really limit the identifier length, it's just that only 6 characters were used to match them. So, shortening names create->create, execute->exec might have come afterward, as a clean up round to make it less surprising.
- colejohnson66 4y agoThat would make sense, but it's still speculation. Preferably, we'd be able to get a definitive answer from Mr. Thompson himself.