c-mera
c-mera copied to clipboard
Names defined in CL overwrite user-functions
In the following example
(function replace (...) -> ...
...)
....
(function foo (...) ...
(replace ...))
replace
maps to the symbol from CL, not the function defined above.
I suppose this is tricky as the Quoty check for macros is based on this behaviour ( @lispbub right?) but this behaviour will be very surprising (and the error message is not really helpful) for new users...
I could add a check/warning if an existing lisp function is used in a function definition: (fuction replace ..
I think issuing a warning would be best thing to do. Changing the mapping of the name would probably lead to chaos :)
One thing, though, users will have to be aware anyhow, will they? E.g. there are functions that overlap via the standard libraries alreads, e.g., sin
et al.
But we can't just issue a warning as such a function call might actually be intended. Still a big issue for the manual.
Maybe we can build a list of duplicate names by checking header files and the CLHS.