From: Ben Giddings Date: 2003-08-05T13:58:16+09:00 Subject: Re: What's New and Shiny in Ruby 1.8.0? On Monday, August 4, 2003, at 11:33 PM, why the lucky stiff wrote: > Since there were a number of requests around for a more detailed > explanation of 1.8.0 changes, I figured I'd start into my favorites and > cover as many as I can. Thanks for doing that. I like that you've not only mentioned the changes but also given some background on why they're interesting and how they might be used. Duck typing is an interesting idea -- but I think to be used well it will require more careful planning. I think the example of testing for the method "read" is a good example. I can imagine a large number of classes that would have a "read" method, but wouldn't return what's expected from an IO type read. Looking at the page, I also have another question concerning Hash.merge. It does essentially the same thing is the set-union for Arrays, right (Array#|)? Would anybody besides me like to see Hash#| become an alias for Hash#merge? To me it would be more obvious that {'key' => 'val'} | {'otherkey' => 'otherval'} returns a new hash and doesn't modify the original one. Either way, the presence of this method is great for some HTTP stuff I'm doing where the only difference between a GET and a POST is that the POST requires a Content-type header. Ben