Dynamic and compile time dispatch