------ 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 <<a href ailto:dblack / rubypal.com">dblack / rubypal.com</a>> wrote:<br><div class mail_quote"><blockquote class mail_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 class h2E3d"><br> <blockquote class mail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> 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:<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 "and" instead of "with" to indicate the addition of a new value to be passed to the block?<br> </blockquote> <br></div> I don't particularly. But then again, I'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. That's why, as much as I respect the talent and effort behind<br> it, I can't use RSpec.<div><div></div><div class j3C7c"></div></div></blockquote><div><br>I keep hearing this objection to RSpec, and can't help but think that it'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't any more.<br><br>And I much prefer<br><br> x.should be_valid<br><br>over <br><br> 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 href ttp://talklikeaduck.denhaven2.com/">http://talklikeaduck.denhaven2.com/</a> ------ art_9709_29985475.1213271441457--