on 2001.04.04 11:29, Jay Reeve at jktr@... wrote: > The > calling fn knows what type of records it's comparing (doesn't it?), so > why not just call the appropriate comparison fn? Not always. Suppose that you are parsing data. You may have many different types of records all in the same linked list. You still have separate FN's for each type of record, but you can also call a router function if you need to handle more than one type of data. If you have router functions for GetID, SetID, GetType, SetType, Compare, and everything else, all of which call the appropriate function based on the type of record being handled, you can write very generic functions which compare and parse many different types of records together. Because your high level functions couldn't care less what sort of data they are working with, you can use them for whatever you want. You can also change the structure of your records without messing up other code. All this router function business can be handled by overriding methods in an object oriented language such as Java, or, I suppose, the Object Runtime when it comes along. Anders ----------------------------------------------------------- Anders Karl Keller anderskarlkeller@... Mac Computer Technical Consultant Hilltribes Project, International Co-operation for Cambodia Banlung, Rattanakiri Province, Kingdom of Cambodia -- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com