I am loathe to decide. I *know* that if I decide one way my next problem
will need it work the other way.

I was originally going to say that it should return Jess native types, since
this is Jess world and it would probably be faster if Jess used it's
internal representation when computing instead of an external reference.

However, having read the wrapper argument I would tend to agree that
"wrapper objects are here to stay". Their immutability could save us a lot
of versioning headaches in the future.

So as far as which side I fall on, I think I would just like to say, uh,
"Present".

Ed Meier
Super Senior Whatchamacallit +1
Clark Software Engineering, Ltd.
Dayton, OH


> Hi Michael,
>
> I can confirm this behaviour in Jess 6, too.  It's actually not just
> field access, but method return values too -- i.e., the return value
> of a method returning Integer would be similarly converted.
>
> It is arguably incorrect for this conversion to be done at all; I'm
> not sure what I was thinking when I defined it this way. I believe the
> current behaviour was influenced by user comments on the behviour of
> Java Strings. Several people expressed the opinion that a method
> returning String should return a Jess string when called from Jess,
> not an external address with a Java String in it.
>
> Let me throw this one out for comment. If you call a method or fetch a
> field of type Integer (or Float, or Double, or Boolean) should it
> return the primitive type in Jess, as it does now, or should it return
> the wrapper object? What do people think?
>
>
> I think Lucero, Michael wrote:
> [Charset iso-8859-1 unsupported, filtering to ASCII...]
> > Using Jess 5.1:
> >
> > if I have a class like this:
> >
> > public class A
> > {
> > public final static Object VAR = new Integer(1);
> >
> > public void setValueById(Object id)
> > {
> > m_val = id;
> >             }
> >
> > private Object m_val,
> > }
> >
> > and rules (forgive syntax errors):
> >
> > (defclass classA A)
> >
> > (defRule varTest
> > (classA (OBJECT ?o))
> > =>
> > (call ?o setValueById (get-member A VAR))
> > )
> >
> > I get an exception when the rule fires:
> >   Message: No overloading of method 'setValueById' in class A I can call
> > with these arguments: (call ?o setValueById (get-member A VAR)).
> >
> > I think the problem here is that 'get-member' does not return an
external
> > address, but has translated it to a Jess Integer type.
> >
> > Is this expected, and, if so, is there a way to prevent that automatic
> > translation.
> >
> > Thanks in advance
> >
> > Michael Lucero
> > ---------------------------------------------------------------------
> > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> > in the BODY of a message to [EMAIL PROTECTED], NOT to the
> > list (use your own address!) List problems? Notify
[EMAIL PROTECTED]
> > ---------------------------------------------------------------------
> >
>
>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9012                  [EMAIL PROTECTED]
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify
[EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
>

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to