On Fri, Sep 26, 2008 at 11:57 AM, Mark Miesfeld <[EMAIL PROTECTED]> wrote: > On Fri, Sep 26, 2008 at 7:40 AM, Rick McGuire <[EMAIL PROTECTED]> wrote: > >> The exercise of writing test cases for the various APIs was an >> interesting process, as it gave me the opportunity to reassess whether >> APIs belonged in the set and also pointed out some holes where >> additional APIs should be provided. > > I've been watching your test cases and interleaving commits to the > interpreter and could see that was what you were doing. <grin> > >> In the process of doing this, I started to question whether the Table >> set of APIs even belong on the list. > > I like the ability to use Table objects in the external methods / > functions rather than stems. I especially like being able to return a > Table object.
I think in the places where you were returning a table object, a directory object is really the more appropriate choice. In general, if all of your keys are strings, a directory would be preferred over a table...and using a directory from the APIs is more efficient generally since you can use CSTRING arguments for the keys. > > However, if you think using SendMessage is just as efficient in the C > / C++ code, then removing the Table APIs seems fine to me. What really counts is the number of times you have to cross the external/internal boundary. Since the number of SendMessage() calls is the same, and what you do with the arguments is the same, the efficiency is basically the same. contrast this with something like ArrayAt(), where you are able to directly pass in the array index as a binary value rather than creating an object from the number, calling SendMessage() so that the interpreter can turn that object back into a binary index. The API allows you to cut a few corners. > > What happens when you are returning a Table object from a API method? > It would be returned as a RexxObject. Would it just then work as > expected in the Rexx code? Is that less efficient? Yes, just return it is as a RexxObjectPtr. There is no loss in efficiency. In fact, any of the specific types used as return types are handled by the same element in the switch statement. > > -- > Mark Miesfeld > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel