While article is interesting and idea workable, the title seems a bit misleading.
(Including the “pattern language” part. I bet 90%of readers were expecting to see some kind of DSL)
While article is interesting and idea workable, the title seems a bit misleading.
(Including the “pattern language” part. I bet 90%of readers were expecting to see some kind of DSL)
- nullable (test double/mock) updates would be more natural, easier, since it is located right there in prod code. (One level of indirection removed)
- with authoritative location of test double, it reduces the risk of test double proliferation/duplication
(I doubt I will use it in the proposed form though, saving test double code in prod is not for me probably)
This seems like a security nightmare. In defense terms: here’s the side road to the castle with gates open, guarded by a single variable.
To put it another way, somewhere in your code you do authorization: `if (isAuthorized) enterTheCastle()`. The gate to the castle, guarded by a single variable. In both cases, you have to be careful to program it correctly.
In the case of Nullables, it’s easy to program it correctly. Multiple things would have to go wrong for the nulled version to be accidentally used in production. Also, unless you go out of your way to make a security vulnerability, Nullables’ default behavior is to do nothing. They default closed rather than open.
Not by an external actor, but by an internal bug.