From: Trans Date: 2006-11-06T10:50:09+09:00 Subject: Re: Ruby.extend Javascript Marcin, David, greg thanks for the feedback. I'm more interested in the question as to why having that capability directly built-in would or would-not be of benefit to Ruby. I'm aware of the class vs. prototype differences and ara's implementation of prototype.rb --i've even written one myself years ago (sloop was new to me though thanks). And granted, we could use such a lib even if it were a tad suprising to on looking Ruby coders. But I'm not really looking at a whole prototype approach so much as just thinking that this one particular capability would be of use. And the reason I say that, is that I find myself more and more often using hashes for parameters rather than straight arguments. In turn I usually prefer accessing them with dot notation rather than hash, so I end up doing: def foo( keys ) keys = keys.to_openobject keys.bar keys.baz ... (OpenObject is an improved OpenStruct BTW) There's a lot of overhead going on here. So when I was working with Javascript today, I couldn't help but think, why do they have it so good in this respect, but Ruby doesn't? T.