That pretty much sums it up, Edders. Now, I just have to go and check the stock situation in the rubber chicken cupboard. They've been getting a lot of use lately...
Printable View
That pretty much sums it up, Edders. Now, I just have to go and check the stock situation in the rubber chicken cupboard. They've been getting a lot of use lately...
Actually you would have to wait until I was done doing it to myself. :DQuote:
Originally Posted by Graham
OF COURSE, such pathalogical cases are BAD DESIGN. But as was once stated "90% of software is crap, heck, 90% of everything is crap".
In order for you to even think about coming to "chicken" me, you first have to be aware that I could have done the "dirty dead" and that is was not a bug in your code, or in the compiler.
As far as the Scott Meyers quotes [and I am a MAJOR quoter, and fan of is, and require reading of his "Effective" serious of all my developers], I agree for general development.
Parameterless Constructors (without the Explicit keyword), and Implicit conversion types should be carefully considered before they are used. The tradeoffs in reliability and maintainablity between them and explicit codeing is significant.
However, I have NOT gone so far as to "Ban" them. I will often use them (intrnally) in certain types of class libraries where there is (by intentional design) extreme amount of conversions between (non-interitance related) object types. These usages are carefully documented, and explicit test cases are developed.
So.. to...
I simply add, "unless you have a solid rational resaon, and can formally justify the impact".Quote:
When Scott Meyers advised us to "do as the ints do",