On 28 July 2011 23:36, menada <eujenia@gmail.com> wrote:
Because the fact is not already in the kbase (so i can't modify it and then
insert it).

(1)
X x = new X(...);
x.setA(...);...x.setZ(...);
insert( x );

(2)
X x = new X(...);
insert( x );
modify( x ){ setA(...),..., setZ(...) }

These two sequences are logically equivalent - you'll have equal objects and facts x at the end. But (1) is decidedly preferred because it is much less work for the engine. Consider: the "insert" in (2) sends it on one direction and then the modify instructs it otherwise.

-W