On Tue, 23 Oct 2018, Sven Schreiber wrote:
Am 23.10.2018 um 16:09 schrieb Allin Cottrell:
> Mostly, defining a variable with the same name as a "visible" function
> won't cause trouble, since the identifier will be handled differently
> depending on whether it's immediately followed by left parenthesis. But
> that can mess up with lags:
OK, I see the issue is more complex.
> series den = normal() # warning but no error
Why actually have a warning here? I kind of understand the motivation, but
either it's OK to have an identifier and a function of the same name, or it
> series denlag = den(-1) # fails
Is there any other incarnation of the problem apart from this lags thing?
I'm pretty sure there isn't. Maybe we should just confine the
diagnostic to the case where a function and series share a name, and
we come across an instance of "shared_name(". As things stand the
function will be called by preference in this case: it might or might
not work in context, and might or might not be what the user actually
wants, so perhaps this should be an error rather than just a warning.