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

Use sentinel function for active bindings #130

Open
hadley opened this issue Aug 30, 2017 · 1 comment
Open

Use sentinel function for active bindings #130

hadley opened this issue Aug 30, 2017 · 1 comment
Labels
feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Aug 30, 2017

public = list(
  blah = active_binding(function(value) {
    
  })
)

And eventually deprecate the active_bindings argument

@hadley hadley added the feature a feature request or enhancement label Apr 3, 2020
@idavydov
Copy link

idavydov commented Jul 7, 2020

Maybe active_binding could have a read_only flag?

public = list(
  blah = active_binding(function() {
    
  }, read_only=TRUE)
)

And then there could be nice error-handling by default (similar to the goal of #100 and #99).

x$blah <- 0
# Error: blah is read-only

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

No branches or pull requests

2 participants