Re: [C++-sig] Implementation of proper overload resolution

2010-01-06 Thread Renato Araujo
This is great, I will try this, but I'm afraid about the size, because my main problem with boost.python is the library size compared to others c++ python bindings, my current library has 16 MB compared to 5 MB from SIP, and in my bindings I have a lot of overload functions and this solution can p

Re: [C++-sig] Implementation of proper overload resolution

2009-12-21 Thread Troy D. Straszheim
Dane Springmeyer writes: > Troy, > > Incidentally, do you know the proper way (or is there a proper way?) > to support None type keyword arguments? > > Cheers, > > Dane > Could you elaborate? What're you trying to do? -t ___ Cplusplus-sig mailin

Re: [C++-sig] Implementation of proper overload resolution

2009-12-21 Thread Troy D. Straszheim
Gustavo Carneiro writes: > Don't you think that when these overloading problems become an issue it is a > sign of a poorly designed API? In this case the intention is to fix bugs in boost.python. The broken example we've been working with is where a parameter is bool in one overload and int in

Re: [C++-sig] Implementation of proper overload resolution

2009-12-21 Thread Hans Meine
Am Freitag, 18. Dezember 2009 16:08:24 schrieb Gustavo Carneiro: > Don't you think that when these overloading problems become an issue it is > a sign of a poorly designed API? I mean, if overloaded functions > parameters are not completely different in type or number, then maybe they > are alread

Re: [C++-sig] Implementation of proper overload resolution

2009-12-20 Thread Neal Becker
When it's ready, I'd like to try it on my code collection (see that at least nothing breaks). ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Implementation of proper overload resolution

2009-12-19 Thread Troy D. Straszheim
Neal Becker writes: > I am concerned that this doesn't introduce too much overhead for the common > case where there is no ambiguity. I suppose this has been optimized? > For the following module: int f(int x, int y, int z) { return x*100 + y*10 + z; } BOOST_PYTHON_MODULE(m) { def("f", &f

Re: [C++-sig] Implementation of proper overload resolution

2009-12-18 Thread Gustavo Carneiro
Don't you think that when these overloading problems become an issue it is a sign of a poorly designed API? I mean, if overloaded functions parameters are not completely different in type or number, then maybe they are already too confusing to use and should not be overloaded in the first place?..

Re: [C++-sig] Implementation of proper overload resolution

2009-12-18 Thread Neal Becker
I am concerned that this doesn't introduce too much overhead for the common case where there is no ambiguity. I suppose this has been optimized? ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-s

Re: [C++-sig] Implementation of proper overload resolution

2009-12-17 Thread Troy D. Straszheim
Neal Becker writes: > I assume overload resolution extends to scoring multiple arguments as well? > Sure. This is the reason that scores are optional. If any single argument scorer returns optional() (meaning 'unsuitable'), this stops evaluation and kills the score for the entire signature. He

Re: [C++-sig] Implementation of proper overload resolution

2009-12-17 Thread Neal Becker
I assume overload resolution extends to scoring multiple arguments as well? ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Implementation of proper overload resolution

2009-12-17 Thread Dane Springmeyer
Troy, Incidentally, do you know the proper way (or is there a proper way?) to support None type keyword arguments? Cheers, Dane On Dec 17, 2009, at 11:11 AM, Dane Springmeyer wrote: Troy, Really __impressive__ write-up and work on this. I'd definitely be interested in build instructi

Re: [C++-sig] Implementation of proper overload resolution

2009-12-17 Thread Dane Springmeyer
Troy, Really __impressive__ write-up and work on this. I'd definitely be interested in build instructions and your work getting into future releases. Cheers, Dane On Dec 17, 2009, at 8:08 AM, Troy D. Straszheim wrote: Here's what I've got on overloading. This turned out to be a lot m

[C++-sig] Implementation of proper overload resolution

2009-12-17 Thread Troy D . Straszheim
Here's what I've got on overloading. This turned out to be a lot more work, and this mail much longer, than I'd hoped. Would appreciate a readthrough and comments/questions, I've done about all I can do. First a review of the problems, then a walkthrough of an implementation I have that fixes t