From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id D3EBFBBC4 for ; Wed, 1 Apr 2009 02:08:20 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am0BAD9N0knZSMDqi2dsb2JhbACBU5RBAQEBCgsKBw8FuA2DegY X-IronPort-AV: E=Sophos;i="4.39,304,1235948400"; d="scan'208";a="37608151" Received: from fmmailgate03.web.de ([217.72.192.234]) by mail4-smtp-sop.national.inria.fr with ESMTP; 01 Apr 2009 02:08:20 +0200 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id 1138EF9CF08A; Wed, 1 Apr 2009 02:08:20 +0200 (CEST) Received: from [78.43.226.218] (helo=frosties.localdomain) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1Loo0B-0002r8-00; Wed, 01 Apr 2009 02:08:20 +0200 Received: from mrvn by frosties.localdomain with local (Exim 4.69) (envelope-from ) id 1Loo0B-0000O0-GB; Wed, 01 Apr 2009 02:08:19 +0200 From: Goswin von Brederlow To: Martin Jambon Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Bug? Constraints get ignored in methods References: <87ab71ic1f.fsf@frosties.localdomain> <49D2A0AF.1080300@ens-lyon.org> Date: Wed, 01 Apr 2009 02:08:19 +0200 In-Reply-To: <49D2A0AF.1080300@ens-lyon.org> (Martin Jambon's message of "Wed, 01 Apr 2009 01:01:03 +0200") Message-ID: <87prfx6xsc.fsf@frosties.localdomain> User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.21 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX18dBrgf5xNQgOTvVUrbKiVFwrorJijHfEVdS64E bfN/4VPfWAJ5gMeuLIhFCNT8jYcDBGsD9bX5pKooXYiKE9Adfc TTjMUmxks= X-Spam: no; 0.00; bug:01 prev:01 functors:01 mfg:98 caml-list:01 data:02 data:02 structures:02 string:02 objects:02 objects:02 constraints:03 let:03 let:03 types:05 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. :)