~/talk

Dependency Injection revisited

Talkat NDC Minnesota 2018 · 2018-05-07..05-10· [software-architecture]
slides:none on file

Argues that dependency injection can be modeled as a tiny DSL and implemented in C# by translating an interface into a functor, then a free monad via Church encoding, with concrete code: discriminated-union-like types, adapters, a select/selectMany implementation, and optional visitor refactor. Builds a reservations program (isReservationInFuture, readReservations, create) and shows it compiles and runs but produces vast boilerplate, recursive selectMany that can blow the stack, awkward query-syntax plumbing, and ultimately recommends using Haskell/F# for this style rather than forcing it into C#.

AI-written summary · about

  1. 0:00Introduction
  2. 3:57Reservation Repository
  3. 5:42Accepting a Reservation
  4. 19:09Discrimination Union
  5. 34:40Discrimination Union F
  6. 38:40AI Reservation Program
  7. 43:02Helper Methods
  8. 44:40Pure Functions
  9. 47:05Refactoring
  10. 48:12Isomorphism
  11. 49:50Query syntax
  12. 52:17Conclusion
~/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.