Is print_table() + print_table_without_emoji() better than print_table(remove_emoji= False)?
Is print_table() + print_table_without_emoji() better than print_table(remove_emoji= False)?
Whenever function semantics need to change, everything degrades further because of refactoring uncertainties (=> you end up with even more parameters).
This will also be extremely resistant to optimization because even finding the "happy path" is non-trivial.
if needed remove the emoji, then print. if performance/table size is an issue, working via streams/generators/etc. should be on the (heh) table anyway.
But if you have conceded to being in quick&dir^H^Hpragmatic-land anyway, IMO both can be ok depending on the context.
`print_table() + print_table_without_emoji()`
vs
`print_table(remove_emoji= False)`
vs
`switch table_name: case emoji: print(table) case no_emoji: print(table no emoji)`
Without understanding the implementation no one can truly say which is the better approach, but this idea of "surface area for bugs" is something that should be considered when approaching these types of decisions.