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

Philosophy #1

Open
3 tasks
harell opened this issue May 4, 2021 · 2 comments
Open
3 tasks

Philosophy #1

harell opened this issue May 4, 2021 · 2 comments

Comments

@harell
Copy link
Member

harell commented May 4, 2021

  • A mechanism for creating events with callable functions. By default will call stop().
  • Extanable class
  • exception as active binding? This way, one can call an exception without parentheses '()'

See utils::withCallingHandlers in https://adv-r.hadley.nz/conditions.html

References

@harell
Copy link
Member Author

harell commented May 4, 2021

BaseException= R6::R6Class("BaseException", public = list(handler = stop))


NameError = R6::R6Class(inherits =  BaseException)
NameError.set("public", "initilize", function(name) self.handler(name))
NameError = NameError$new()


NameError('HiThere')

@harell
Copy link
Member Author

harell commented May 30, 2021

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

1 participant