This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: converting to String in Kawa


I checked in some patches that do
(a) change the <String> type (i.e. Type.tostring_type) so that it basically
is (x == null ? null : x.toString()) for a given input value x, with some
optimizations.  (A future optimizations might be to define Scheme types
such as <string> as being implicitly non-null.  In that case we could
leave out the test for null when converting a Scheme <string> to a <String>.
But for now the optimizations are for constant values and when x is
klnow to be a ,java.lang.String>.)

(b) I changed it so that the type <String> is used automatically when 
passing
a argument to a Java method that expects a java.lang.String parameter.
This means that both the old and new behavior will work, though at the
cost of the test for null described in (a), except when it can be 
optimzed away.
    --Per



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]