← Graph

Isn't the dry-container recipe global state?

question 2 connections

An audience member points out that the dry-container approach relies on global state. Ivan concedes it is a global and a 'dirty trick', but argues the purpose is different from current_user-in-model globals: it concentrates all replacement-of-real-implementations logic in one place so that other layers don't have to deal with more complexity. Same mechanism (global), different intent.

answer_summary
Yes, it is global state, but scoped to dependency swapping — a dirty trick justified by consolidating complexity in one place.
question Isn't the dry-container recipe global state?
about
Challenges dry-container's use of a global container.
question Isn't the dry-container recipe global state?
asked_at
Audience challenge during the dry-container demonstration.

Provenance

Read by
5 extractions