~/talk

Why is nobody using Refinements?

Talkat RubyConf 2015 · 2015-11-15..11-17· [ruby]
slides:none on file

Refinements are presented as a lexically scoped, safe alternative to global monkey‑patching, with five concrete principles showing when they activate and why blocks, reopened classes, subclasses and separate files often don’t see them; working examples include preserving an old camelize API, an RSpec‑style DSL, and a restricted‑access pattern, plus microbenchmarks that show no performance penalty and multiple demos that actually work despite unintuitive quirks—recommendation: learn the lexical scope rules and treat refinements as a safe alternative.

AI-written summary · about

  1. 0:00Intro
  2. 1:41A mechanism to change the behaviour of an object in a limited and controlled way
  3. 9:00Refinements are activated in current and nested lexical scopes
  4. 11:03class hierarchy # scope hierarchy
  5. 12:51methods are evaluated using the lexical scope at their definition
  6. 13:54blocks are evaluated using the lexical scope at their definition
  7. 14:34Refinements use lexical scope
  8. 17:05Monkey patching
  9. 20:32Managing API changes
  10. 23:51Internal access control
  11. 27:59Lack of understanding?
  12. 29:52Adding using everywhere is a giant pain in the ass?
  13. 30:14Rails (and Ruby) doesn't use them
  14. 31:46Implementation quirks?
  15. 32:39Refinements solve a problem that nobody has?
  16. 33:27The rise of Object-Oriented Design?
~/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.