------art_9709_29985475.1213271441457
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wed, Jun 11, 2008 at 2:52 AM, David A. Black <dblack / rubypal.com> wrote:

> On Wed, 11 Jun 2008, David Flanagan wrote:
>
>  I'm beginning to feel that the method we're discussing here is one
>> particular member of a set of methods for defining custom iterations.
>> Imagine something like:
>>
>> a1.each.with_index.and_next_of(a2).and_const(a3).and_returning([]) do
>> |elt1, index, elt2, a3, retval|
>> end
>>
>> Or:
>>
>> [1,2,3].each.alternating_with([4,5,6]).and_returning([]) {|x,ret|...}
>>
>> Does anyone like the use of "and" instead of "with" to indicate the
>> addition of a new value to be passed to the block?
>>
>
> I don't particularly. But then again, I'm not a fan of lots of
> chaining that tries to make things sound like English narrative. It
> never really does, and I just lose track of it in the Ruby part of my
> brain.  That's why, as much as I respect the talent and effort behind
> it, I can't use RSpec.
>

I keep hearing this objection to RSpec, and can't help but think that it's
based on outdated information.

I had lots of issues with RSpec when it first came out, but looked again
after talking to David Chelimsky at RubyConf.

While it used to use method chaining a lot, it really doesn't any more.

And I much prefer

   x.should be_valid

over

  assert(x.valid?)

A small thing perhaps, but small things have a habit of adding up.

However de gustibus...

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

------art_9709_29985475.1213271441457
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wed, Jun 11, 2008 at 2:52 AM, David A. Black &lt;<a hrefailto:dblack / rubypal.com">dblack / rubypal.com</a>&gt; wrote:<br><div classmail_quote"><blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 11 Jun 2008, David Flanagan wrote:<br><div classh2E3d"><br>
<blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m beginning to feel that the method we&#39;re discussing here is one particular member of a set of methods for defining custom iterations. Imagine something like:<br>
<br>
a1.each.with_index.and_next_of(a2).and_const(a3).and_returning([]) do<br>
|elt1, index, elt2, a3, retval|<br>
end<br>
<br>
Or:<br>
<br>
[1,2,3].each.alternating_with([4,5,6]).and_returning([]) {|x,ret|...}<br>
<br>
Does anyone like the use of &quot;and&quot; instead of &quot;with&quot; to indicate the addition of a new value to be passed to the block?<br>
</blockquote>
<br></div>
I don&#39;t particularly. But then again, I&#39;m not a fan of lots of<br>
chaining that tries to make things sound like English narrative. It<br>
never really does, and I just lose track of it in the Ruby part of my<br>
brain. &nbsp;That&#39;s why, as much as I respect the talent and effort behind<br>
it, I can&#39;t use RSpec.<div><div></div><div classj3C7c"></div></div></blockquote><div><br>I keep hearing this objection to RSpec, and can&#39;t help but think that it&#39;s based on outdated information.<br><br>I had lots of issues with RSpec when it first came out, but looked again after talking to David Chelimsky at RubyConf.<br>
<br>While it used to use method chaining a lot, it really doesn&#39;t any more.<br><br>And I much prefer<br><br>&nbsp;&nbsp; x.should be_valid<br><br>over <br><br>&nbsp; assert(x.valid?)<br><br>A small thing perhaps, but small things have a habit of adding up.<br>
<br>However de gustibus... <br></div></div><br>-- <br>Rick DeNatale<br><br>My blog on Ruby<br><a hrefttp://talklikeaduck.denhaven2.com/">http://talklikeaduck.denhaven2.com/</a>

------art_9709_29985475.1213271441457--