Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn that defmacro() can have side effects #8

Open
RLesur opened this issue May 2, 2021 · 1 comment
Open

Warn that defmacro() can have side effects #8

RLesur opened this issue May 2, 2021 · 1 comment

Comments

@RLesur
Copy link

RLesur commented May 2, 2021

Hi,

Thanks a lot for your work on this package.

I have a dummy question about defmacro(). Its documentation clearly mentions that it comes from Thomas Lumley's article in R News. This article indicates that

a macro would have undesirable side-effects

I had a hard time while debugging some programs which use defmacro() because of these side effects. I haven't used it before that and it was clear that the R users who had written these programs were not aware of the side effects of defmacro().

I wonder whether you would agree to warn users about using defmacro()?
Personnally, I am not convinced that using defmacro() is safe. IMHO, this function should only be used by advanced users who understand the risks.

@warnes
Copy link
Member

warnes commented May 25, 2021

I would be glad to add an appropriate warning. Can you suggest some text?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants