9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Howard Trickey howard@plan9.bell-labs.com
Subject: limbo
Date: Thu, 18 Jul 1996 08:09:39 -0400	[thread overview]
Message-ID: <19960718120939.dMEgWWz6jvyrolhYI0KCr_Q3Peb7KwDSI8QnD88ph_o@z> (raw)

> 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)




             reply	other threads:[~1996-07-18 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-18 12:09 Howard [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-08-02 15:32 limbo ^*_*^
1996-08-02 15:32 limbo ^*_*^
1996-07-23 14:34 limbo Alexandre
1996-07-19 20:43 limbo philw
1996-07-19 20:11 limbo Balaji
1996-07-18 10:38 limbo Roger
1996-07-18  3:28 limbo Rogers
1996-07-17 23:56 limbo philw
1996-07-17 23:29 limbo Shon
1996-07-17 15:39 limbo Roger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19960718120939.dMEgWWz6jvyrolhYI0KCr_Q3Peb7KwDSI8QnD88ph_o@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).