From: MikkelFJ Date: 2002-11-15T08:21:22+09:00 Subject: Re: Ruby.NET ?? "Aleksei Guzev" wrote in message news:aqvds0$d6ono$1@ID-167200.news.dfncis.de... > I'm afraid NET framework does not support some concepts like mixing or > extending objects. But I'm now writing a Ruby module loading NET framework > into Ruby (not Ruby to NET!) and marshalling calls to the NET framework. So > one could use NET classes as Ruby ones. But exposing Ruby classes to NET as > well as mixing NET and Ruby or NET and NET classes and objects seems being > difficult. C# has got and indexer method. This goes back to COM where you can write myobject.mymember as if mymember was a member of myobject. In reality, myobject.mymember is defined as myobject.item("mymember"). So it's sort of Ruby's method_missing. Also note that indexers can have parameters: myobject.myothermember(2) = 3. You can implement Ruby in whatever way in dot net. The interesting part is how other languages access members. If a Ruby object is just a dot not object with an indexer method, I think you can cover most issues. It's a misconception that dot net is necessarily statically typed, but obviously you can represent a dynamic Ruby class directly as a typed dot net class. dot net needs to interoperate with COM objects. COM objects are sometimes only exposed via IDistpatch, which is a runtime access interface where you can query a function by name and subsequently call it. While dot not is not COM clearly some of the same principles must apply to Ruby. Note how IDispatch is used to integrate COM objects in Ruby (and there's also a stalled project making Ruby objects COM objects also relying on IDispatch). Mikkel