| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Operationalize orthogonality
Tony D wrote:
> Pickie wrote:
>
>>I ask because these seem to me to be basic concepts (or primitive types?) >>and both of them have simple ways to represent a boolean (zero and >>empty string respectively being false, all else true).
LOL Your post reminds me of the C++ string class a colleague I once had found online. It had constructors and caste operations into and out of every type imaginable. He thought it was the bees knees because he never had to bother with type casts etc.
Until one day he introduced a bug in his code that took days to find.
He was building a long string from a lot of smaller strings using a whole lot of statements like:
s += "Some constant text followed by a variable "; s += sTextInVar; s += ": " + iQuantity; s =+ " @ " + dPrice;
Of course, nobody in their right mind would create a unary plus operation for the string type. But that won't stop a determined compiler when it finds an implicit type cast to double, a unary plus operation for double, and an implicit type cast back to string:
"0 some more text etc. etc."
He fought with his code for days until I pointed out the reversed '+=', and then it took me a half hour to convince him it didn't require a bug in the compiler to treat his code as syntactically correct. Received on Thu Jun 01 2006 - 08:52:26 CDT
![]() |
![]() |