[Swift-devel] print misbehavin'
Ben Clifford
benc at hawaga.org.uk
Wed Apr 18 04:01:20 CDT 2007
On Thu, 12 Apr 2007, Mihael Hategan wrote:
> Actually that will break user defined procs, since they expect wrapped
> values.
> And the translation of + to sum() is also weird since it will break if
> you have any wrapped values one either side.
ok. I didn't commit that.
In r620 I put in some different 'toString()' handling for the cases where
AbstractDataNode.toString() was returning null -- it now provides some
descriptive information instead:
print(3)
gives (instead of the previous "null"):
unnamed SwiftScript value with value 3
and
print(1+2)
still gives (as previously):
3
This isn't the behaviour that I'd like in the long term, but I haven't
really thought about what the right way to proceed there is - either your
suggestions below, or removing the presence of non-wrapped types entirely.
> I mean there are two choices here. There are swift values and non-swift
> values. Using them with a plain karajan function requires them to be
> unwrapped (vdl:getfieldvalue) and the result wrapped back with vdl:new.
> Alternatively the function can be overriden to work on swift values.
--
More information about the Swift-devel
mailing list