From: James Britt Date: 2004-10-29T04:49:57+09:00 Subject: Re: Ruby Vs. ... might find comparison of interest. trans. (T. Onoma) wrote: > On Thursday 28 October 2004 02:38 pm, James Britt wrote: > | trans. (T. Onoma) wrote: > | > http://www.garret.ru/~knizhnik/dybase/doc/dybase.html#specific > | > | He doesn't know enough Ruby to be making such comparisons. > | > | "For example reflection support in Ruby is very restricted - it is not > | possible to access instance variables outside the object. " > | > | False. > | > | Articles such as these might be better referred to as "Somebody's > | 10-minute understanding of Ruby vs ..." > > True. But that's not the point. That kind of info is "out there". And this > site was referenced from a Ruby lib called, 'purple', which essentially said > that DyBase was a better way to go --that's I how I found it. Ah. I see. > > So its easy to say he doesn't know diddly. But we as a community still need to > address such things --and from both sides. Where they are accurate we should > improve on our end, and where they are inaccurate we need to get them to > improve on their end. On that not I will email him. Is ther anything else I > should add besides the instance var thing? I already sent him a note. We had short exchange and he is going to update his Ruby-DyBase API. > > Speaking of which what advantage does > > obj.instance_var_set("@x", 10) > obj.instance_variable_get("@x") > > have over, > > obj.@x = 10 > obj.@x > > Surely the later can be parsed. Perhaps. I'm at odds over the ability to simply trod over the object->message-to-access-an-attribute approach, where one must explicitly expose object attributes via messages if other code is to access them. It can be easy to abuse, but then, so what? The uglier syntax may at least serve as a red flag that you are doing something of dubious OO purity. If it matters. James