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

And you can do the same in Rust with Box<Any>. What Rust doesn't have is the object slicing gotcha, which is probably a language design mistake in C++.



That gotcha is yet another flaw inherited from copy-paste compatibility with C.

structs being classes with public access by default, with default assignment operator behaving the same way as C code would expect.




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

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

Search: