-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
'{}' being 'bad practice' could go for some justification #1804
Comments
I remember 'back in the day' that using |
Thanks! I poked at the source of |
I remember something similar to Martin: that the definition with { and without them was not the same. I think at some point it caused some problems on a Bioconductor packages and the fix was to simply remove it and the methods worked well (so no performance hit but resolution or environment problems). I don't remember when that happened but probably not that far but closer to ~5 years or so, because I think it was discussed on Bioconductor slack. But I agree with the issue, backing this advice with a rationale or example of the problems it can cause would be good. |
adv-r/S4.Rmd
Lines 345 to 352 in 14bdb11
Casually, it seems strange to expect a noteworthy performance hit from using
{
. And it's ambiguous when we expect that performance hit -- package build time, or run time?I glanced at the
setGeneric()
code and didn't immediately spot any "edge case", it probably requires more careful reading to figure this out.Moreover, there are multiple examples in
?setGeneric
itself that use{
:https://github.com/r-devel/r-svn/blob/43449c0a9d00390293ce9c0d7df855edfb10c0e2/src/library/methods/man/setGeneric.Rd#L322-L340
A link to an external reference here would be good.
The text was updated successfully, but these errors were encountered: