Non-null objects, the Null Object pattern, and T.init

Walter Bright newshound2 at digitalmars.com
Fri Jan 17 19:30:03 PST 2014


On 1/17/2014 7:05 PM, H. S. Teoh wrote:
 > [...]

Thank you, a good explanation.

I don't know how the anti-skid brake system is designed. But on the older 
systems, brakes are a dual mostly-independent system. There was one system for 
the front brakes, and another for the rear. Dual cylinders, dual reservoirs, 
etc. The brake pedal operated both cylinders. There was even a hydraulic 
comparator between the two, which would turn on a red [brake] light on the dash 
if they differed in pressure.

Last year, I acquired a leak in my rear brakes on my old truck, and that light 
coming on was my first indication of trouble. The front brakes still worked 
fine, and topping off the rear reservoir got the rear brakes temporarily 
working, and I was able to ease it to the repair shop without difficulty.

It's a good example of how to build a safe, fault tolerant system.


More information about the Digitalmars-d mailing list