3 ms·
> Due to hash calculations, you can’t add single-character tokens, tokens that are of the same length but differ after 3rd characters onwards People to this da
by chx 5y ago
> Due to hash calculations, you can’t add single-character tokens, tokens that are of the same length but differ after 3rd characters onwards
People to this day laugh at Rasmus choosing the length of function names in PHP decades ago and go does, well, not the same, but let's just say a variant of it. Oh the irony.
- Thaxll 5y agoIt's not a variant of it, it's an optimization because Go "never" add new keywords.
- throwaway19937 5y ago> People to this day laugh at Rasmus choosing the length of function names in PHP decades ago and go does, well, not the same, but let's just say a variant of it. Oh the irony. This is a difference in kind, not degree. PHP has wonky function names because Rasmus didn't know any better. The Go token hash is a private implementation detail; they can change it and only the compiler internals are affected.
- deleted 5y ago[deleted]