[0]: https://dave.cheney.net/2018/05/29/how-the-go-runtime-implem...
4,933 karma · joined September 11, 2020
Contact ibraheem@ibraheem.ca.
[0]: https://dave.cheney.net/2018/05/29/how-the-go-runtime-implem...
That's because of the way the parser is written. There are other simpler parsers that are much more readable.
> The generic dilemma is this: do you want slow programmers, slow compilers and bloated binaries, or slow execution times?
> I would be happy to learn about implementations that somehow manage to avoid all three of these bad outcomes, especially if there were good written descriptions (papers, blog posts, etc.) about what was hard and why it's a good approach. I'd also be interested to see good written descriptions of trying one of those approaches and what went wrong (or right).
- Russ Cox (2009): https://research.swtch.com/generic
Go maps are actually not generic in the same way they are in other languages, there is just a single map struct with type descriptors used to do some compiler magic: https://dave.cheney.net/2018/05/29/how-the-go-runtime-implem...
type Foo interface {
Foo() int
}
`interface{}` is simply a shortform for an interface with no methods.[0]: https://github.com/leafo/moonscript
How does Devise handle 'revoke all sessions for this user'?