> Yes, I imagine that it's more trouble than it's worth. > Linked lists are really only useful when you're dealing > with a language that does not support dynamically-sized > arrays but need that functionality.
That was sort of my thinking... Arrays and actually queries, given that at least if you're not concerned about i18n collation (which I am) most databases provide an easier mechanism for sorting out of the box. But then as i18n becomes more important/popular I expect there will be more support for pluggable, in-statement collation, but I expect that to be a pretty slow transition, whereas I can get flexible collation now using Java if I'm willing to put up with the fact that it's not as fast as a sql sort. > Classic construction requires the use of pointers to > memory locations - a trait that CF does not support, > because it's not necessary due to the abstraction and > functionality that the language offers. Umm... <!--- create a pointer to a new object ---> <cfset variables.x = createObject(...)> <!--- create a pointer to the previous object ---> <cfet varaibles.y = variables.x> How is that not supporting pointers? True that I don't address the memory myself, but CF still does what I would be doing in C anyway, so I don't see how creating this pointer is significantly different than creating a C pointer except that in C I would be allowed to screw myself. > Also, creating a real linked list is an exercise in > garbage collection and operator overloading since a > shallow copy is merely a reference to the same nodes > as the original and destruction of the linked list > requires a specific deallocation of the memory > locations that the list refers to. Well CF doesn't provide programmatic access to its garbage collection, so I assume if I remove the pointers from the object (<cfset structDelete(variables,"nextItem")>) the CF server will garbage collect the object during its regular GC when there's no longer an active memory pointer to it, just as it does if you delete it from an existing array with ArrayDeleteAt(). > I can't think of a good reason for you to attempt > to create a CF version of the linked list, > especially since it's not *really* a linked list. I'll have to perform some performance tests, but I was thinking it might be an improvement over using a query of queries in some cases to perform sorting on a data set stored in the session scope and thinking it would be nice to have an "array" that I can sort and otherwise manipulate without recreating it each time. List Page -> Sort page (sentinel.sortBy("myproperty")) -> cflocation -> list page ... yeah I can do that with an array, I'm just thinkin'... s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218077 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54