| ▲ | uecker 2 hours ago | ||||||||||||||||
They make sense but reduce type safety, because once you add the cast the case might hide some real typing issue. I sympathize with the idea that the down-cast should be explicit though. | |||||||||||||||||
| ▲ | spacechild1 an hour ago | parent [-] | ||||||||||||||||
> They make sense but reduce type safety Yes, downcasting can be unsafe and should be used carefully, but what's the alternative? At least in C++ you can't cast between unrelated types without an explicit reinterpret_cast (or C-style cast). | |||||||||||||||||
| |||||||||||||||||