c-mera icon indicating copy to clipboard operation
c-mera copied to clipboard

Names defined in CL overwrite user-functions

Open kiselgra opened this issue 7 years ago • 3 comments

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...

kiselgra avatar Mar 09 '17 11:03 kiselgra

I could add a check/warning if an existing lisp function is used in a function definition: (fuction replace ..

lispbub avatar Mar 09 '17 12:03 lispbub

I think issuing a warning would be best thing to do. Changing the mapping of the name would probably lead to chaos :)

kiselgra avatar Dec 01 '17 22:12 kiselgra

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.

kiselgra avatar Dec 01 '17 22:12 kiselgra