Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [golo-dev] Issue on overloaded function resolution

I disagree with the default function approch, as mentioned by Daniel or Sylvain. I rather a more explicit solution.
1. the partialization view, even if frequent, is not necessary, and thus returning the bigger arity will not always be the desired behavior
2. even if the lesser arity is just a partialized version, returning the non partialized one will lead to code duplication since one have to respecify the default value.
3. more importantly, it is not robust to change: if a new ambiguous function with a higher priority is added (varargs, more/less parameters) the client code may change in behavior without but can remains unnoticed, particularly in the case of varargs shadowing
--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.

Back to the top