Comment

Comment by whent

Are function tables really all that cleaner? Honest question. If I can offer a counterpoint a function table requires us to code some function dispatch routine that looks at the intention (keywords in function table), then looks up the function, then finds a way to bind the arguments to the function (language specific) and finally call the function? Isn't this more complexity in code?

Isn't switch-case simple because it is available as a construct in the language?

parent whent 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton