From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 195CDBBAF for ; Thu, 3 Jun 2010 17:31:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUDAFZnB0zB/Bd4lGdsb2JhbACSEIwVFQEBAQEJCwgJEQMfv1GFFgQ X-IronPort-AV: E=Sophos;i="4.53,355,1272837600"; d="scan'208";a="60567264" Received: from smtp-msa-out01.orange.fr ([193.252.23.120]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Jun 2010 17:31:01 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 84B3B1C009A4 for ; Thu, 3 Jun 2010 17:31:01 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 7332B1C0097E for ; Thu, 3 Jun 2010 17:31:01 +0200 (CEST) Received: from [192.168.1.100] (APuteaux-154-1-70-204.w81-249.abo.wanadoo.fr [81.249.113.204]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 3CB991C005F3 for ; Thu, 3 Jun 2010 17:31:01 +0200 (CEST) X-ME-UUID: 20100603153101248.3CB991C005F3@mwinf5a04.orange.fr X-ME-User-Auth: lexifi Message-ID: <4C07CAB4.3060803@frisch.fr> Date: Thu, 03 Jun 2010 17:31:00 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Questions concerning modules as first-class values References: <367372.3609.qm@web111501.mail.gq1.yahoo.com> <21533_1275496091_o52GSC5l015052_4C068697.5050007@frisch.fr> <20100602173618.GD23344@localhost> In-Reply-To: <20100602173618.GD23344@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; frisch:01 frisch:01 runtime:01 marshaled:01 plug-in:98 wrote:01 caml-list:01 functions:01 functions:01 marshal:01 marshal:01 coercion:01 alain:01 alain:01 define:02 On 02/06/2010 19:36, Eric Cooper wrote: > Is it possible to marshal and unmarshal these packages? Yes, this is possible, but: 1. Extremely dangerous: there is no runtime type-checking. If you marshal a module, you need to unmarshal it to the same package type, exactly (no coercion allowed). 2. Rather useless: the code for functions within modules is not marshaled (as for regular functions). If you marshal a module that define functions, you need to unmarshal it in the same program. > That might be a nice way to implement a plug-in architecture. Given the points above, I don't think so! Alain