~/talk

Classboxes, nested methods, and real private methods

Talkat RubyConf 2010 · 2010-11-11..11-13· [ruby]
slides:none on file

Proposes a concrete feature: lexical refinements activated lexically that live in modules and are enabled with module using to scope method overrides to specific files or classes only, keeping global behavior unchanged while allowing nested methods and truly private helpers. Implementation lives in a private repo, supports inheritance rules, allows calling original via refinement super, cannot refine modules directly (cannot refine modules), shows benchmarks (~2.5% slower) and rejects dynamic classboxes.

AI-written summary · about

  1. 0:00Start
  2. 0:48Self introduction
  3. 3:04Topics
  4. 3:35What are Classboxes?
  5. 3:49How to extend classes in Ruby?
  6. 4:13Aspects of subclassing
  7. 5:38An example of LSP
  8. 6:31A typical LSP violation
  9. 8:25A Ruby-specific LSP violation
  10. 8:50Subclassing != Subtyping
  11. 9:46Aspects of mix-in
  12. 10:43Aspects of singleton methods
  13. 11:21o⚫⚫ Aspects of open classes
  14. 11:41Ruby on Rails
  15. 13:30LSP and open classes
  16. 13:57an LSP violation
  17. 15:27What we need
  18. 15:44Possible solutions
  19. 15:54selector namespace
  20. 18:09An example of Classbox/J
  21. 18:54An example of local rebinding
  22. 19:59Is local rebinding needed?
  23. 21:50An example of Refinements
  24. 22:50Demo
  25. 26:22Class local refinements
  26. 27:22An example of Module#using
  27. 28:00using and include
  28. 29:03Using original features
  29. 29:58An example of special eval
  30. 30:15Compatibility
  31. 30:52Applications of refinements
  32. 31:09Refinements of built-in classes
  33. 33:18Nested methods
  34. 34:17Additional benchmarks
  35. 34:42Benchmark result
  36. 35:39Considerations
  37. 36:44Workaround
  38. 36:55Should modules be refinable?
  39. 37:15Implementation improvement
  40. 37:33Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.