Yes, this is one of those baked in historical oddities like every mature system has. You know, ones that, when you ask the original designer, the answer always starts with "It made sense at that time..."
Those decisions might come back and bite you. But that doesn't mean the original designers made the wrong choice per se, they might just not have been able to see the whole picture that would result many years after they made their choices.
Think of the Apollo 1 fire. It made sense for NASA to use a pure oxygen atmosphere in their capsules. It saved a lot of weight (weight is everything in rocketry) AND it made the capsules actually safer (no risk of accidentaly putting too much nitrogen in due to a bad sensor, suffocating the astronauts). It made sense to pressurize the capsules on the launch pad to test that they are not leaking away the precious air in space (reducing the risk of a Soyuz 11 catastrophe). It made sense to place Velcro strips all over the spacecraft interior to prevent objects floating around and messing up other systems (after all, in space under the normal, low O2 pressure, Velcro doesn't sustain fire).
What nearly nobody realised were the consequences of the combination of all those factors. In the high, pure oxygen pressure during the plugs out test, Velcro doesn't just burn, it basically explodes. Gus, Ed and Roger paid the price. And yes, Apollo had an inward opening hatch that was presumable safer than the explosive hatch used on Gemini. It was engineered to prevent a repeat of the Gemini accident that nearly killed Gus. It's secured and doesn't open when the capsule is pressurized, just like the doors on modern airliners...
So, defined() sometimes does autovivication and can give you a bad day. But i'm sure the original designers implemented it this way to prevent some problems they encountered at the time.
In reply to Re^3: Defined test creates non-empty hash value
by cavac
in thread Defined test creates non-empty hash value
by glendeni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |