Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
rami3l
· 4y ago · 0 comments
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?
Comments
[–]
zozbot234
4y ago
Enums and "sealed" classes enable closed vs. open dispatching. Static (compile-time) vs. dynamic would effectively be devirtualization.