[omniORB] strings parameters passing rules.

Tingle, Alex Alex.Tingle at bronermetals.com
Wed Oct 8 15:06:45 BST 2003


Clarke Brunt wrote:
> I think Alex forgot to change the declaration of str_inout to 
> something that was capable of returning anything useful to
> the caller.

Yes I missed that. Thanks.

> And use the _var types wherever possible! They are the answer 
> to all your problems of possibly forgetting to free things,
> handling exceptions correctly, etc.

I think that the _var types are both a blessing and a curse. They do help to
avoid memory leaks, but they also pretend to hide away the complex details.
They look nice and easy to use, but in reality you still need to understand
what's going on underneath. Because they look straightforward, they lull
newcomers into a false sense of security. I certainly made a lot of mistakes
at first, by assuming that _var types would 'just work'.

It's a shame. I'm sure that a more natural C++ mapping could be devised. The
authors of Henning & Vinoski claim that the nastiness of the C++ mapping is
due to a misplaced desire for compatibility with the C mapping.

-Alex



More information about the omniORB-list mailing list