[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Newer xsubpp



On Sun, Jan 23, 2000 at 01:10:20AM -0800, Gurusamy Sarathy wrote:
> On Fri, 21 Jan 2000 03:31:35 EST, Ilya Zakharevich wrote:
> >The copy of xsubpp which I have on my disk allows for ANSI-style
> >declarations, and in/inout/out modifiers.  Say, XSUB
> >
> >int
> >foo( in int a, out double b, inout IV c);
> >
> >can be used from Perl as
> >
> >($res, $b, $c_out) = foo($a, $c_in);
> >
> >Basically, 'in' is ignored, 'out' variables are not in the Perl
> 
> So why require them to specify 'in'?  Just make it the default.
> 
> >parameter list, 'inout' variables are in the parameter list and in the
> >output list.
> >
> >Please tell me what you think.
> 
> Since this looks like just syntactic sugar over what XS already
> provides, it may be worth writing this as a preprocessor that emits
> the equivalent XS code.

I'm really not very comfortable with pure out values being specified in
the prototype. It's unnatural and ambiguous. Bound to cause confusion.
They should be specified elsewhere.

Tim.


Follow-Ups from:
Ilya Zakharevich <ilya@math.ohio-state.edu>
References to:
Ilya Zakharevich <ilya@math.ohio-state.edu>
Gurusamy Sarathy <gsar@ActiveState.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]