2 ms·
What's it offering that's more idiomatic than the `isinstance()` it breaks down to other than resembling virtual functions in C++? What's costlier, the new sta
by LukeB42 6y ago
What's it offering that's more idiomatic than the `isinstance()` it breaks down to other than resembling virtual functions in C++?
What's costlier, the new stack frames plus conditional for a decorator or the `elif isinstance()`s in one function definition?
How does a programmer reference the correct function definition by name if they're using @typedispatch instead of `isinstance()`?
- qayxc 6y agoI get the feeling that you don't know what virtual functions in C++ are. I'd suggest you stop comparing typed dispatch to virtual functions in C++, because they have nothing in common. If you want to draw parallels, make sure to use a suitable analog.
- LukeB42 6y agoI'm thinking of templates, if that helps.