naught icon indicating copy to clipboard operation
naught copied to clipboard

Null-aware Proxies

Open avdi opened this issue 11 years ago • 0 comments

Wrap myvalue and intercept each method call, wrapping the return value. If ANY call returns nil, replace it with a null object:

SomeConversionFunc(myvalue).foo.bar.baz # => <null>

Counterpoint: without Demeter violations this wouldn't be needed ;-)

avdi avatar May 29 '13 14:05 avdi