Experts of @rustlang: if you need a stack/vec which should store values of different types, would you use Box<Any> or enum { A(..), B(..) }?
-
-
Enum gets you static dispatch, which is nice. But sometimes you need the more extensible solution.
-
Thanks a lot for the tips! This is for autogen code for a parser generator, so might be fully "dynamic". But, I can infer types and gen enum
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.