I’m reviewing a package and there is a function called
Acc. to the conventions I’d propose to make it all lowercase. But then
var clashes with the
Base.var function and gives a warning when calling the function. What are my options now?
Iiuc I cannot use (and export)
var in a user package without having warnings. The name
VaR seems too much non-standard. Using qualified calls,
MyPkg.var, would be an option. Import ‘var’ and redefine it would be another option (but I think it’s not a good idea to redefine functions with a completely different behaviour?). I suppose, using a non-abbreviated name, e.g.
value_at_risk, would be the best choice.
Opinions? What are you doing in such a situation? I think it should be quite common that short abbreviated function names clash with names in Base (or, less bad, other packages).