4 ms·
> If name-clashes become a problem, add prefixes to the function names Or, find better names for local variables, like customer-address. In the given example,
by junke 11y ago
> If name-clashes become a problem, add prefixes to the function names
Or, find better names for local variables, like customer-address. In the given example, there is in fact no need to add local variables: simply calling the functions would be enough.
- barrkel 11y agoChanging function names after the fact is a versioning problem. I'd much rather not have to rename functions. Changing global names because you're having a hard time with local names seems like a developer anti-pattern.
- wtetzner 11y ago> Or, find better names for local variables, like customer-address. In the given example, there is in fact no need to add local variables: simply calling the functions would be enough. Or require the function using a namespace alias.