Is it wise to rely on default features of a programming language?
- by George Edison
Should I frequently rely on default values?
For example, in PHP, if you have the following:
<?php
$var .= "Value";
?>
This is perfectly fine - it works. But what if assignment like this to a previously unused variable is later eliminated from the language? (I'm not referring to just general assignment to an unused variable.)
There are countless examples of where the default value of something has changed and so much existing code was then useless.
On the other hand, without default values, there is a lot of code redundancy.
What is the proper way of dealing with this?