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

Think for example of implementing a list interpreter. In certain situations, you know for a fact that an AST node is a given type. So you just want to cast from Node to Node::Symbol(s) to extract that std::string::String out of it. RFC #2593 seems like it would help here, and is something I've wanted for similar but unrelated reasons. So in the meantime I made poor_mans_cast!() macro to do this, which I've used twice already.



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

Search: