Datatypes: To be “0″ or not to be “0″…
Argh… how much time (and money) is wasted every year by bugfixing problems caused when a variable becomes zero although there is not much sense for the variable to become zero within the actual context of the program and therefore the programmer missed to add a line for checking this unexpected behavior.
The most common example for this might be if a for-loop will start at zero or one.
I really ask myself if it would be worth creating a new datatype “unsignedNotZero” which can not be set to zero and letting the compiler do most of the checking for me?! Suggestions?
Recent Entries
- Is my code compiled on Mono (or Microsoft .NET)?
- Definition of C#
- Google Wave – A Revolution done wrong!
- C# and implicit conversions
- Mein Cluster hat vier Räder ;)
- OpenVPN and Windows7
- M$ SharePoint and Symlinks…
- Die sones GmbH sucht weitere engagierte Softwareentwickler
- Detexify2 – Latex symbol classifier
- Piratenspot “Klarmachen zum Ändern” 2009
November 24th, 2008 at 12:08 am
Schau dir mal Adas Positive an. Mittels bereichsgeprüfter Subtypes kannst du da sogar jeden beliebigen Bereich vorgeben…
[Reply]