Re: Thinking about MINUS
Date: Tue, 09 Jan 2007 20:26:52 GMT
Message-ID: <gUSoh.42784$cz.626440_at_ursa-nb00s0.nbnet.nb.ca>
Gene Wirchenko wrote:
> Bob Badour <bbadour_at_pei.sympatico.ca> wrote:
>
> [snip]
>
>>Unless we make one up, we have no + operation that operates on numbers
>>and strings. Similarly, we have no < comparison that operates on numbers
>>and strings. However, the equality comparison operates on any two values
>>(unless we go out of our way to redefine it otherwise.)
>>
>>Semantically, it makes no sense to say "This orange is less than that
> > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >
>>apple"; however, it makes perfect sense to say "This orange is not that
> > ^^^^^^ > I would substitute 'Similarly, it makes no sense to say "This > orange is less than that apple", unless we have defined a less than > operator.' For example, the comparison might be of weight or of cost.
But then the question becomes: "Is this weight less than that weight?" and "Is this cost less than that cost?" which are completely different questions.
>>apple". If someone asks "Is this orange less than that apple?", we have
>>a question we can parse but neither interpret nor answer. If someone
>>asks "Is this orange that apple?", we have a question we can parse,
>>interpret and answer correctly: "No, it is not."
>
> [snip]
If we compare the weight of the orange to the weight of the apple asking "Are these weights the same?", the answer might be "Yes, they are."
>>Agreed. In fact, if I recall correctly, someone once determined that the
>>lint warning for unused local variables correlated more with bugs than
>>any other warning or error message. Of course, that might be urban
>>legend. (I am relying solely on a ~20 year old memory, and I doubt I
>>read the original work.)
> > It does take some doing to declare a variable and never use it. > The reverse is more common, but it gets flagged by many compilers. > > [snip]
If one turns on full warnings, many compilers will flag both.
>>If you have not read it yet, I highly recommend this recent essay by
>>Hugh Darwen:
>>http://www.dcs.warwick.ac.uk/~hugh/TTM/HAVING-A-Blunderful-Time.html
> > > Thank you. > > [snip] > >
>>A bit of meat, cheese and a cracker might prove more effective without
>>the alcohol. A bit of fruit and a slice of ham should do the trick too.
>
> It is getting a bit late for holiday leftovers.
My condolences to everyone living Irma Rombauer's eternity: "Two people and a ham."
It occurs to me a glass of warm milk might provide an appropriate mix of carbs and protein too. Received on Tue Jan 09 2007 - 21:26:52 CET