From: Robert Klemme Date: 2007-05-28T19:55:04+09:00 Subject: Re: Introducing the "it" keyword On 27.05.2007 20:04, Robert Dober wrote: > On 5/27/07, Robert Klemme wrote: >> On 27.05.2007 11:46, Robert Dober wrote: >> > On 5/27/07, Robert Klemme wrote: >> > >> >> >> >> >> > That is something I am surprised about, b/c the intention was to >> have >> >> > an idiom for >> >> > return it if h(x) < 10 >> >> >> >> No, it's "return it if it < 10" with "it" being "v+1" in this case. >> > Well that was the original idiom but we are looking for existing ones, >> > right? >> >> Yes, and that's why I presented what I presented. I am not sure I >> understand your point here. :-) >> >> >> > and >> >> > return it_test(h(x)) >> >> > really is not the same, right? >> >> >> >> It's not the same but I believe you misread the task. it_test is >> just a >> >> method to demonstrate the idiom in lines 2-4. >> > >> > Ah that's why you called the method test_..., not stupid at all ;) >> > Well I will get to understand what is going on here... >> > .. eventually... >> > .. potentially... >> > .. maybe... >> > .. hardly... >> >> Um... It's really not that difficult. > Sure it is, actually the code is simple, I still try to grasp what is > wanted here, you see? >> Hope that explains it. If not, let me know. > Well see above but never mind :) > Thx for your time, I shall probably say what I think about all of this: > (a) > return v if ((v = 42) % 2).zero? > would be nice if it worked > (b) > I am against fancy enhancements that are purely for optimization but see > above. We are completely on the same page with this. Kind regards robert