Hacker News new | past | comments | ask | show | jobs | submit login

Sure, you can implement it yourself. But even if you create an amazing tree/hashmap-based type-signature-tuple inheritance-aware multiple dispatch object, you still have to think about how to make other packages use it.

I would also be interested how you would deal with the dynamic case of type erasure in this setup. Suppose I have a base class Base and derived classes A, B, and C. There's a set of functions

    f(A*, B*, A*)
    f(C*, A*, A*)
for some combinations of pointers to A, B and C. Given a

    std::vector<std::tuple<Base*,Base*,Base*>>
how do you apply the correct f to all its values?



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: