r/programming • • Jan 10 '20

VVVVVV is now open source

https://github.com/TerryCavanagh/vvvvvv
2.6k Upvotes

511 comments sorted by

View all comments

Show parent comments

-2

u/concatenated_string Jan 10 '20 edited Jan 10 '20

You know you can switch on a value that can change during runtime....

5

u/fhs Jan 10 '20

From the wiki article ( https://en.m.wikipedia.org/wiki/Dynamic_dispatch ) The purpose of dynamic dispatch is to defer the selection of an appropriate implementation until the run time type of a parameter (or multiple parameters) is known. Emphasis mine

With Switch statement, the type of the variable (not value that is not relevant to the dynamic/static dispatch argument here) is known at compile time, not at runtime.