Hi, I've gone through the code for fluids to understand it. And how it relates to unification variables.
Some facts for fluids: * Allocation is slow, can be made faster but still it seams to be slow - Allocates on the heap - uses a mutex - scans a list of fluid numbers from the beginning to find the next free one * Fluid numbers are used to lookup the meaning of a fluid under a context meaning that each context keep a translation table. So fluids can be used for unification variables but it will be unpractically slow because new variables are very often created. The current unification variables * Allocation is stack-like, but the stack is separate. * local variables to a thread e.g. not meant to be shared between threads. * keep an undo array. of the form (id val1 id2 val2 ....) and having the frames point into this list and at unwinding walk the list backwards and revert the variables. * fast to do lookup, e.g. less indirections then fluids. So, it would be cool to make fluids allocate faster and also make unify variables be able to be shared between threads. Comments? Regards Stefan