From: Pascal J.B. <pj...@in...> - 2004-11-24 16:58:23
|
Joseph Kiniry writes: > I'm porting an application (OBJ3) to CMUCL, SBCL, and CLISP. > > I need a function that will define a total order on two arbitrary > structures. > > In my other ports, I've used internal functions to get lists of slots, > orders on them, etc. > > Do the CMUCL, SBCL, and CLISP developers have suggestions for > implementing such a function? I've dug around the internal > functionality, but have not found an obvious solution to this problem. Should this order be the same on all these implementations? Should it be the same accross sessions? In general for structures it's not possible, there's no reflectivity of structures. Either you limit yourself to the structure defined with one of your macros that will keep the fields arround, or you'll have to use CLOS. Note that some structure types may be defined to be implemented with lists or vectors! -- __Pascal Bourguignon__ http://www.informatimago.com/ The world will now reboot; don't bother saving your artefacts. |