caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Martin Jambon <martin.jambon@ens-lyon.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Bug? Constraints get ignored in methods
Date: Wed, 01 Apr 2009 02:08:19 +0200	[thread overview]
Message-ID: <87prfx6xsc.fsf@frosties.localdomain> (raw)
In-Reply-To: <49D2A0AF.1080300@ens-lyon.org> (Martin Jambon's message of "Wed, 01 Apr 2009 01:01:03 +0200")

Hi,

small add on to my last mail.

Think of it as having a set of work queues: clean, dirty, reading,
writing, write_prepare. The objects need to be able to quickly jump
from one queue to the back of another when the objects internal state
changes. And is not only the objects at the head of the queue that
change states. Can be pretty random what object changes.

If I put the prev/next links into the objects themself they can easily
detach themself from a queue and insert themself into another.

If I put the objects into other generic queue structures then I have to
find the position in the old queue to remove an object and that would
be slow.


If you can think of a solution that would allow

type 'a data = { next : 'b data option; data : 'a }

without having to know possibly types of 'b then I could use functors.

This would have to work:

let s = { next = None; data = "string" }
let i = { next = Some s; data = 23 }

MfG
        Goswin

PS: and I don't mean using obj.magic. :)


  parent reply	other threads:[~2009-04-01  0:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 22:05 Goswin von Brederlow
2009-03-31 23:01 ` [Caml-list] " Martin Jambon
2009-03-31 23:12   ` Martin Jambon
2009-03-31 23:52   ` Goswin von Brederlow
2009-04-01  0:08   ` Goswin von Brederlow [this message]
2009-04-01 11:41     ` Martin Jambon
2009-04-01 15:57       ` Goswin von Brederlow
2009-04-01 18:45         ` Martin Jambon
2009-04-01  1:24 ` Peng Zang
2009-04-01  3:25   ` Goswin von Brederlow
2009-04-02  8:39 ` Jacques GARRIGUE
2009-04-03 20:53   ` Goswin von Brederlow
2009-04-06  4:30     ` Jacques Garrigue

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=87prfx6xsc.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --cc=caml-list@yquem.inria.fr \
    --cc=martin.jambon@ens-lyon.org \
    /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).