2 ms·
It would be nice to have an "evil_override" keyword (or some other such name). There's no fundamental technical reason you can't do it, with unsafe pointer blac
by geofft 11y ago
It would be nice to have an "evil_override" keyword (or some other such name). There's no fundamental technical reason you can't do it, with unsafe pointer black magic if necessary, and it's sort of like an LD_PRELOAD: it's not a good solution, but sometimes you have to break abstraction barriers to get things done, and at least if you're using it you're explicitly saying you're breaking abstraction barriers.
final by default doesn't prevent someone from manually adding final to their classes.
- mikeash 11y agoThat wouldn't really work, because the compiler can do things like generate static dispatch or even inline method calls for final classes.