2 ms·
This still has a vtable creation/dispatch overhead in your example (if I wasn't clear, this was my larger concern, not the type switches). It also has troubles
by Manishearth 12y ago
This still has a vtable creation/dispatch overhead in your example (if I wasn't clear, this was my larger concern, not the type switches). It also has troubles with local variables, though they can be solved pretty easily.
But point taken. I will try to use this pattern in the future.
> Go has its fair share of shortcomings, but try to _learn_ the language before writing yet another misinformed article.
I believe I was pretty clear in the article that I didn't know the Go way of doing things and this was about what Go looked like from a Rust point of view. This was not supposed to be a rant, just a post that sort of illustrates the differences between the languages. IMO it actually gives a clearer idea of what Rust is like than it does of Go since the "Rust way" of doing things is clear from the comparisons..