From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 18 Jul 1996 08:09:39 -0400 From: Howard Trickey howard@plan9.bell-labs.com Subject: limbo Topicbox-Message-UUID: 493f5e7a-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19960718120939.dMEgWWz6jvyrolhYI0KCr_Q3Peb7KwDSI8QnD88ph_o@z> > would it be possible to implement a qsort replacement in limbo ? It is possible, but the answer is so ugly that the real answer is "no". (The caller could pass in a channel, and then be willing to answer questions like "is element 5 greater than element 3" over the channel; the answer could be an array of element indices in their sort order. Channels of ascii can be a universal way around type checking.) So, for instance, there is a module for sorting directory entries (in various ways), but no general purpose sorting module. Actually, the thing that bugs me more is the need to write what should be generic list functions (e.g., rev, nth) for each element type. Limbo currently doesn't have polymorphism or (discriminated) union types because of the tradeoff decision about usefulness vs implementation cost (the garbage collector would need more in the presence of the above). But the language isn't embalmed by a standards committee yet... Howard Trickey (Limbo programmer and language design kibitzer)