Hacker News new | ask | show | jobs
by etal 6587 days ago
It's really just a performance optimization for C, in situations where the switching value can be hashed. In languages that make method dispatch easy, and the overhead of a function call is not something you're terribly concerned about, it makes sense to just roll your own as needed -- that's why Python never bothered with a switch statement.