How many Object-Oriented Programmers does it take to change a lightbulb?
You shouldn't be changing the light bulb by hand. If you'd used Electric::Light instead of reinventing the wheel, the Electric::Light::Socket would have noticed the need for a new Electric::Light::Bulb object and instantiated it automatically. By rolling your own implementation, you're likely to get all kinds of edge cases wrong. Can your hand-rolled lightbulb-changing code correctly handle 240V 50Hz current and install the correct sized bulb for the room in question? What about 120V and 60Hz? What if the building's electrical system uses unicode? What if this is an embedded lightbulb running on a small flashlight system? Electric::Light handles all of these details correctly for you. By trying to do this stuff yourself, you're going to repeat every bug that's been ironed out of that module over the years. Will your hand-rolled implementation be tested by millions of people worldwide on dozens of platforms, from LED-based indicator lights all the way up to redundant arrays of airport beacons? No. Use Electric::Light or die.
In reply to use Electric::Light or die
by jonadab
in thread Light Bulb Joke
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |