Re: Sorting collections at runtime
Posted: Fri Aug 07, 2009 11:13 am
by Carl Ranson >> Fri, 5 Mar 1999 2:54:13 GMT
I suppose it wouldn't be too hard to write your own binary tree, hash table, or even btree. each member class (or the data structure class) would have to provide a "lessThan(object) : boolean" and an "equal(object) : Boolean" method.
Of course none of these would be able to take advantage of jades mechanism for setting up memeber keys etc. It may also suffer performance problems.
<whinge>
I've always found it a bit disapointing that Jade hides away the collection types. You would think jade only uses a small set of methods for its automatic update mechanism, and should be able to work data structures other than bTrees.
</whinge>
Carl
I suppose it wouldn't be too hard to write your own binary tree, hash table, or even btree. each member class (or the data structure class) would have to provide a "lessThan(object) : boolean" and an "equal(object) : Boolean" method.
Of course none of these would be able to take advantage of jades mechanism for setting up memeber keys etc. It may also suffer performance problems.
<whinge>
I've always found it a bit disapointing that Jade hides away the collection types. You would think jade only uses a small set of methods for its automatic update mechanism, and should be able to work data structures other than bTrees.
</whinge>
Carl