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: before kawa-1.8


Hoehle, Joerg-Cyril wrote:

One thing that comes to my mind as a possible improvement is somewhat better integration of Java functions returning java.math.BigInteger.
All Java functions which manipulate large numbers operate on these, and I've been bitten several times by things which display as a large number in Kawa but are not Kawa objects (i.e. Scheme + or -  obviously don't work on them).
But I don't know whether it would be a good idea to automatically transform a java.math.BigInteger into a gnu.math.BigInteger when entering Scheme. They may have different semantics (shared or not, immutable or not byte[]).

I vaguely remember mentioning a biginteger problem with JDBC last year, but I don't have access to an Oracle DB anymore for testing.

Integrating BigInteger into Kawa arithmetic is not a change I want to work on right now. Converting BigInteger to IntNum is inefficient, as is arithmethic that can add a BigInteger and a IntNum. The cleanest option is to replace IntNum by BigInteger, but it would probably be a performance regression: Now we use IntNum for *all* Scheme integers, and we have optimization to do this torerably well. Also, now all Scheme numbers inherit from gnu.math.Numeric, which has builtin support for mix-type arithmetic. java.math and java.lang don't.


So it's tricky. I have me forced to deal with it - but not for 1.8.

One of many function I just haven't gotten around to implementing.

Oh, I had understood the document in the sense that dm:node-kind is the standard, but that qexo provides fn:node-kind instead. I did not understand that the standard provides two ways of expressing the same thing (does it)?

The document is not a Qexo-specific document. The difference is the the dm: functions are *conceptual* (expository) functions, which only exist in the data model, but which you can use in a program, while the fn: functions are libary functions that you can use in a program. (Assuming they have been implemented, which is not always the case in Kawa.)
--
--Per Bothner
per@bothner.com http://per.bothner.com/




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