From: Eric Mahurin Date: 2008-10-09T01:14:27+09:00 Subject: [ruby-core:19210] Re: refute_{equal, match, nil, same} is not useful ------=_Part_41860_30969946.1223482594408 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Oct 8, 2008 at 2:48 AM, Martin Duerst wrote: > Related to this: > > Just yesterday, I re-ran some tests that I had made weeks ago. > They now ran on miniunit. As some others (I think Dave, among > others) have already mentioned, looking at all these > "deprecated" messages was truely horrible. Please let's fix > this soon, and let's not get linguistic correctness > (whichever way that would be) or personal preference > (except if that's Matz's preference, of course) trump > over actual usablility. > > So please switch off the warnings, or make sure they appear > only once in a whole test run. We can then have as much > discussion on method names as we want, and then can have > Matz make a final decision if we can't agree. But we > will still be able to do actual work in the meantime. I agree. I still haven't seen a compelling argument to deprecate "assert" and use the opposite polarity. I prefer "assert" but I can see the value of negating the polarity with "refute" (but I'd rather see something like "fail_if" to better describe what it is doing): it describes the condition when an action will be taken. But, there are many reasons to keep assert: - compatibility - why break things (or spew out warnings) with something arbitrary like this? - convention - every other language that I know of with a standard checking construct/call uses the equivalent of "assert". Convention should always play a big role when making relatively arbitrary API decision. - ruby's conditionals (and loops) support both polarities. Why should this be any different? We have "if" and "unless". We can have both "assert" and "refute" in the same way. Eric ------=_Part_41860_30969946.1223482594408 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On Wed, Oct 8, 2008 at 2:48 AM, Martin Duerst <duerst@it.aoyama.ac.jp> wrote:
Related to this:

Just yesterday, I re-ran some tests that I had made weeks ago.
They now ran on miniunit. As some others (I think Dave, among
others) have already mentioned, looking at all these
"deprecated" messages was truely horrible. Please let's fix
this soon, and let's not get linguistic correctness
(whichever way that would be) or personal preference
(except if that's Matz's preference, of course) trump
over actual usablility.

So please switch off the warnings, or make sure they appear
only once in a whole test run. We can then have as much
discussion on method names as we want, and then can have
Matz make a final decision if we can't agree. But we
will still be able to do actual work in the meantime.

I agree.  I still haven't seen a compelling argument to deprecate "assert" and use the opposite polarity.  I prefer "assert" but I can see the value of negating the polarity with "refute" (but I'd rather see something like "fail_if" to better describe what it is doing): it describes the condition when an action will be taken.  But, there are many reasons to keep assert:
  • compatibility - why break things (or spew out warnings) with something arbitrary like this?
  • convention - every other language that I know of with a standard checking construct/call uses the equivalent of "assert".   Convention should always play a big role when making relatively arbitrary API decision.
  • ruby's conditionals (and loops) support both polarities.  Why should this be any different?  We have "if" and "unless".  We can have both "assert" and "refute" in the same way.
Eric

------=_Part_41860_30969946.1223482594408--