From: dblack@... Date: 2006-11-13T22:45:41+09:00 Subject: Re: returning keyword HI -- On Mon, 13 Nov 2006, S. Robert James wrote: > Wilson Bilkovich wrote: >> >> On 11/13/06, S. Robert James wrote: >>> What is the "returning" keyword? It's usually used with a block, but I >>> can't find what it is. >>> >> >> It's not a keyword; it is a method added by the ActiveSupport library. >> More here: >> http://weblog.jamisbuck.org/2006/10/27/mining-activesupport-object-returning > > Thanks. > > Wow! That's an example of clever code. The code's less clear, no > shorter, and confusing to someone not familiar with this new method - > and for what? To be able to show off cool meta programming? > > I think Rails is great, but someone needs to remind people that "clever > code" is an insult. Hang on a second. I know that there's a vogue for snideness and "rants" these days, but please -- try not to be swept along by the tide. If you know Sam, who committed the #returning method, you'll know that there's literally no possibility that he's "showing off cool meta programming". If you don't know Sam, come to a Rails conference some time and introduce yourself. You can also check out his best-known work, a JavaScript library called Prototype. It ships with Rails, and has currency and popularity well beyond Rails. In general, remember that when you participate in this forum, you're not sitting in a darkened theater making wisecracks to images on a screen. Rather, you're among colleagues and fellow practitioners, an astounding number of whom are willing and able to discuss technical matters intelligently and enthusiastically with you. It's not just a matter of not flinging insults at people who might actually hear you (though that's part of it). It's also about taking advantage of the knowledge and, most importantly, the collegiality available to you here if you choose not to spurn it. David -- David A. Black | dblack@rubypal.com Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org