(j3.2006) (SC22WG5.3587) OPTIONAL arguments and C interop

Aleksandar Donev donev1
Wed Jul 16 16:34:12 EDT 2008


On Wednesday 16 July 2008 12:25, Jim Xia wrote:

> Choice (a) is in no way worse than the original design. 
Bogus! For example:
1) There are two instead of one arguments, complicating the mental process of 
interpreting interfaces, complicating the calling sequence, and requiring 
matching between the two arguments (for example, what if one passes 
present=true for the second argument but passes a NULL address for the 
first?)
2) (Bill did say this): It is anot about one vendor versus another. The NULL 
way of passing arguments is *natural* to C programmers and is a good way to 
do it. It just happened that some vendors chose that already so it worked 
well.

> Not able to support OPTIOANL with VALUE attribute is a significant
> technical reason.
That's assuming it is a compelling thing to support. The number of codes using 
VALUE and not using C interop (in which case OPTIONAL is not allowed) is 
negligible, especially given VALUE was primarily added to support interop. So 
the combination of the two is a rarity that I see no reason we have to 
support by all means.

I'd prefer no interop for OPTIONAL over some weird 2-argument scheme.

Best,
Aleks



More information about the J3 mailing list