hello, I am just curious: Minero Aoki wrote: > > Hi all, > > > [ruby-dev:16059] New Struct > > Consider why Struct class is poorly used. > We need two steps to create a new Struct object, because Struct.new > creates a new class. How about this shortcut method: > > st = Struct.new(:name => 'ruby', :age => 9) > p st.type #=> Struct > p st.name #=> "ruby" > p st.age #=> 9 what is the difference with using Object instance variables ? st = MyStruct.new(name => 'ruby', age => 9) p st.type #=> MyStruct p st.name #=> "ruby" p st.age #=> 9 > > def some_method > .... > return Struct.new(:name => 'ruby, :age => 9) > end > what is the difference with: def some_method .... return Hash.new(name => 'ruby', age => 9) end is it performance considerations ? jf