Y
Hacker News
new
|
ask
|
show
|
jobs
by
rami3l
1558 days ago
Instead of enums, how about something similar to Scala's sealed trait syntax to tell the compiler that I'm actually doing a static dispatch?
1 comments
zozbot234
1558 days ago
Enums and "sealed" classes enable closed vs. open dispatching. Static (compile-time) vs. dynamic would effectively be devirtualization.
link