-
Notifications
You must be signed in to change notification settings - Fork 5
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
Suggestion: Something similar to python decorators #100
Comments
I'm not a fan of decorators for R (I say this as a former python-first person who long ago impulsively wrote a package to implement decorators* 😛) for a couple reasons:
*implementation was internal at my employer and I think it's now lost to time, but I've done something similar in dgkf/typewriter where I flag functions as having a type signature using a decorator syntax. |
Well, what can I say, I am convinced!
Now that you mention it, I remember being surprised to learn that decorators are just higher order functions when learning python. f <- decorator(function() {
...
}) I quite like your last suggestion with the reverse pipe. f <- decorator() <| function() {
...
} |
Also closing this as it is not needed. |
See this issue for some discussion: HenrikBengtsson/Wishlist-for-R#131
The text was updated successfully, but these errors were encountered: