DEV Community

Discussion on: How I want my command inputs, but nobody agrees

Collapse
 
geordiepowers profile image
Geordie Powers

It's not ideal, but I'm not too concerned. In my benchmarks versus the switch style, it's about half as fast to process a command. Startup time is of course greatly increased, but since the system allows for new commands to be later added during runtime, program startup doesn't need to happen often.

I can't speak for every situation, but my Discord bots aren't super performance-critical, so I find the maintainability and expressive freedom offered by this solution to be a much bigger win.