From: Yee Keat Date: 2001-11-29T10:52:05+09:00 Subject: [ruby-talk:26853] Re: overload possible? I was playing around with Ruby/QT the other day, without overloading, I think the interface to QT is not really pretty, as QT uses a lot of function overloading, especially in the constructor's part. I think the Programming Ruby book concentrates much on Extending Ruby in C, but not in C++, I am yet to have a look at how to extend Ruby in C++ and how also to convert an C++ library (like QT) to Ruby. I am aware of the beast called SWIG, any other pointers to get me started in this area? On Wednesday 28 November 2001 10:51 pm, you wrote: > >>>>> "W" == Wyss Clemens writes: > > W> So my (previous) example would not work? > > No, because it's not valid in ruby i.e. in ruby you can't write > > def meth(a) > end > > def meth(a, b) > end > > and have 2 differents methods, this is why I don't give the possibility to > write > > def meth(Array a) > end > > def meth(Hash a, Object b) > end > > > In ruby you can write > > def meth(a, b) > end > > and my extension just give you the possibility to write > > def meth(Array a, Array b) > end > > def meth(Hash a, Hash b) > end > > it's (at least for me :-)) orthogonal > > > Guy Decoux -- Cheers, Yee Keat