From: Mathieu Bouchard Date: 2003-11-24T06:51:58+09:00 Subject: Re: open-uri patch, added progress_proc hook On Mon, 24 Nov 2003, T. Onoma wrote: > Well I don't think so, but I'm crazy so.... I think there's just some > irrational distaste for i = nil at the root of this (no one likes to have > nothing ;) The idea of assigning to a variable a value that won't be used is possibly what causes a conceptual problem... "first assignment causes variable creation" is weird to people who are used to declare variables by declaration and assign to them by assignment. If it's just the look of "i=nil" that is a problem, then usually you can just do "i=true" and already it looks so much more assertive and positive. I mean, "i=true" looks like a bright sunny day, while "i=nil" looks like "i am nihil" and makes you think of romantic existentialists dressed in black in a dark smoky bar, muttering in a pathetically tragic dark voice that life is meaningless. However sometimes i often need to incrementally construct an array with a loop, and #map doesn't always work for this, so i create a r=[] outside of the loop. Is that something you'd call ugly? > > > p.s. if you don't mind me asking, what do you think of Structural > > > Reflection? > > never heard about it, though the words do sound familiar. what is it? > Refelection is when code can look at itself (inspection) and also manipulate > itself. So Ruby has reflection at the OO level. It's one of the greatest > things about Ruby. Structural reflection is a step or two lower, where a > language can actually manipulate its own statements, That's what LISP already had before most languages went into existence, and that I've been dreaming about for Ruby, and that I've been begging Matz to add to Ruby, since back when Ruby 1.6 was also a dream. Then I've wrote several letters in favour of the inclusion of that feature, and after receiving not enough approval, I abandoned those ideas, about two years ago. At that moment I had a spec and half of an implementation. > Actually, Ruby does have some *limited structural reflection* through > the use of eval. I don't really see how the current eval() has something to do with it. ________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju