The LISP-like language is well-suited for writing rule LHS; that much
should be obvious. It's used on the RHS for several reasons: first,
obviously, for consistency. Second, and more important, computing with
symbols is quite convenient, and Java doesn't support that
directly. Third, although some constructs may seem awkward, there are
plenty of things that are more elegantly expressed in Jess than in
Java: compare
(foreach ?item (create$ milk bread butter)
(buy ?item))
to
String[] list = new String[] { "milk", "bread", "butter"};
for (int item=0; item<list.length; ++i)
buy(list[item]);
The usual programming model for Jess, however, is to write rules with
fairly short, simple RHSs, doing complicated actions in Java
instead. It's so simple to integrate Java code into Jess systems that
you can easily have the best of both worlds. The logical conclusion of
this trend is to have every rule's RHS be a single function call to a
unique implementation function written in Java, and you could
certainly code that way if you like.
Nevertheless, there are many, many rule engines available, with a wide
range of rule languages. Search the web to find others and pick one
that suits you.
I think =?iso-8859-1?B?TOogVGjgbmggU+FjaA==?= wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi Everybody.
>
> I'm studying rule-based systems in order to build my own system.
> In my own system, rules are used as business constraints on top of the databases.
>
> I and somebody here, used to program in C,C++, java language. So that we've
>found some obstacles in coding rules with Lisp-style syntax (in RHS of rules).
> Would you please tell me know:
> - Why do we use lisp-style syntax in ACTION-BODY of rules that are currently used in
>JESS and CLISP ?
> - What advantages can we have when we use LISP-style ?
> - If we had another rule syntax that is C++, java-style in ACTION-BODY, what
>disadvantages would we meet?
> - Why don't we build another JESS that use rules with java-style in ACTION-BODY ?
>
> Thanks!
>
> L.T.Sach.
>
---------------------------------------------------------
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]
--------------------------------------------------------------------