[Swift-devel] print misbehavin'
Mihael Hategan
hategan at mcs.anl.gov
Wed Apr 18 10:57:31 CDT 2007
On Wed, 2007-04-18 at 10:23 -0500, Yong Zhao wrote:
> Yeah, I wanted to wrap the karajan functions such as sum, product etc
> and return handles but then realized that karajan did not keep the type
> information.
It does not have a type system. Of course it doesn't keep type info, nor
would it have polymorphism.
But I don't think that's an issue. We've already established that from
the beginning and created a swift specific type system. I don't see why
that cannot be used.
I.e. instead of sum, you translate to vdl:sum which unwraps the values,
does the addition and wraps the result back. This is pretty much what
any dynamic type system would do.
> We need to find a way to make this right.
>
> Yong.
>
> On Wed, 18 Apr 2007, Ben Clifford wrote:
>
> >
> >
> > On Thu, 12 Apr 2007, Mihael Hategan wrote:
> >
> > > Actually that will break user defined procs, since they expect wrapped
> > > values.
> >
> > user defined procs are broken either way - at present, they can't take
> > expressions are parameters:
> >
> > q=p(3) correctly outputs a 3 in something like this:
> >
> > type file {};
> >
> > (file i) p(int n) {
> > app {
> > echo n stdout=@filename(i);
> > }
> > }
> >
> > file q <"volume.blah">;
> >
> > q=p(3);
> >
> > but saying q=p(1+2) breaks with this:
> >
> > Incompatible argument type for var: expected handle; got java.lang.Double.
> > Offending argument: 3.0
> >
> > for pretty much the same reason - its expecting a wrapped value but
> > expression evaluation is providing an unwrapped value.
> >
> > bleugh.
> >
> > --
> > _______________________________________________
> > Swift-devel mailing list
> > Swift-devel at ci.uchicago.edu
> > http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> >
>
More information about the Swift-devel
mailing list